RES - *Brittney Brown, Stat 3010, Final Project: Analysis...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: *Brittney Brown, Stat 3010, Final Project: Analysis of Medical Resident * *TO VIEW DATA IN SAS; * PROC PRINT DATA = RESIDENT; RUN; R *SETTING SYSTEM OPTIONS; * DM 'LOG;CLEAR;OUT;CLEAR;'; OPTIONS LS=90 PS=66 FORMDLIM="="; QUIT; Q *ASSIGN LIBREF; * LIBNAME R1 'T:\STAT3010'; L *ADDING DATA LABELS; * DATA R1; SET R1; LABEL D2= 'AGE' D8= 'NUMBER OF ON-CALL DAYS IN AN AVERAGE MONTH' D9= 'NUMBER OF NIGHTS/WEEKENDS WORKED IN AN AVERAGE WEEK' D10= 'NUMBER OF HOURS OF SLEEP IN AN AVERAGE NIGHT' D11= 'NUMBER OF HOURS WORKED IN AN AVERAGE WEEK' PGY= 'POST-GRADUATE YEAR' SEX= 'GENDER' PS28A= 'PROFESSIONAL STRESSORS' MBI_EE= 'EMOTIONAL EXHAUSTION' RUN; R *ADDING VARIABLE VALUE LABELS; * PROC FORMAT; VALUE $SEX 0 = 'FEMALE' 1 = 'MALE'; VALUE $PS28A 1= 'NOT AT ALL' 2= 'SLIGHT AMOUNT' 3= 'MODERATE AMOUNT' 4= 'LARGE AMOUNT' 5= 'EXTREME AMOUNT'; RUN; Data RESIDENT; Set RESIDENT; Format Gender $SEX. Plant $PS28A.; Run; Proc Print data=RESIDENT; Run; *CREATING NEW CATEGORICAL VARIABLE; DATA RESIDENT1; SET RESIDENT; IF PGY < 3 THEN PGY = 'EARLY'; ELSE IF PGY => 3 THEN PGY = 'LATE'; RUN; R Data RESIDENT1; Set RESIDENT; If D2 <15 Then D2 = 'New'; Else If D2 =>15 AND D2<=30 Then D2 = 'Experienced'; Else If D2 >30 Then D2 = 'Mature'; Run; R **TABLE 1; ODS RTF; PROC PRINT DATA = RESIDENT; VAR D2 D8 D9 D10 D11 PS28A SEX PGY MBI_EE; RUN; ODS RTF CLOSE; O **DESCRIPTIVE STATISTICS; ODS RTF; PROC MEANS DATA = RESIDENT MEAN MEDIAN MAX MIN STD; VAR D2 D8 D9 D10 D11 PGY MBI_EE; RUN; ODS RTF CLOSE; **PIE CHARTS; proc gchart data=RESIDENT;...
View Full Document

Page1 / 7

RES - *Brittney Brown, Stat 3010, Final Project: Analysis...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online