An_introduction_to_SAS____Part_3_

An_introduction_to_SAS____Part_3_ - Websites...

Info icon This 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;
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern