An_introduction_to_SAS____Part_3_

An_introduction_to_SAS____Part_3_ - Websites:

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

View Full Document Right Arrow Icon
Websites: http://www.ats.ucla.edu/stat/sas/notes2/ http://www.ats.ucla.edu/stat/sas/modules/intsas.htm Examples DATASET; 10 M 80 84 A 7 M 85 89 A 4 F 90 86 B 20 M 82 85 B 25 F 94 94 A 14 F 88 84 C title ' grades of exams'; data grades; infile "C:\grades.txt"; input subject gender $ exam1 exam2 grade_1 $; run ; proc noprint data= grades; run ; /* descriptive statistics;*/ proc means data= grades; run; /*descriptive statistics of specific*/ proc means data= grades N MEAN MEDIAN STD STDERR RANGE MIN MAX; run; proc print data=grades; /*descriptive statistics of specific variables*/ proc means data= grades N MEAN MEDIAN STD STDERR RANGE MIN MAX CLM LCLM UCLCM Q1 Q2 Q3; var exam1 exam2; run; data grades1; set grades; final = (exam1 + exam2)/ 2 ; if final >= 0 and final < 65 then grade ='F'; ELSE if final >= 65 and final < 75 then grade = 'C'; ELSE IF FINAL >= 75 and final < 85 then grade= 'B'; ELSE if final >= 85 then grade = 'A'; RUN ; PROC SORT DATA=GRADES1; BY SUBJECT; RUN ; PROC PRINT DATA= GRADES1; ID subject;
Background image of page 1

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

View Full DocumentRight Arrow Icon
var exam1 exam2 final grade grade_1; run ; proc freq data= grades1; tables gender grade_1 grade/ NOCUM;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

An_introduction_to_SAS____Part_3_ - Websites:

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