p2_1_abc - proc sort data=SASdata.College out...

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

View Full Document Right Arrow Icon
dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o *2-1; * *The following title will appear as the first line of every page in the output window; title1 'Problem 2-1, STAT 6360'; t *a. Compute the mean, median, minimum, and maximum and the number of both missing and nonmissing values for the variables ClassRank and GPA* ; title2 'PROC MEANS - adding a VAR statement and requesting specific statistics'; proc means data=SASdata.College n nmiss mean median min max; var ClassRank GPA; run; r *b. Repeat part a, except compute the desired statistics for each combination of Gender SchoolSize. *; *Using a CLASS statement.*; * title2 'PROC MEANS - using a CLASS statement'; proc means data=SASdata.College n nmiss mean median min max; class Gender SchoolSize; var ClassRank GPA; run; r *Using a BY statement.*; *Sort the data first*; title2 'Sort the dataset by Gender SchoolSize';
Background image of page 1

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

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

Unformatted text preview: proc sort data=SASdata.College out =College_sort1; by Gender SchoolSize; run; r *Compute the desired statistics*; proc means data=College_sort1 n nmiss mean median min max; by Gender SchoolSize ; var ClassRank GPA; run; r *c. Report the mean and median GPA and ClassRank broken down by school size (SchoolSize). *; *Using a CLASS statement.*; * title2 'PROC MEANS - using a CLASS statement'; proc means data=SASdata.College mean median; class SchoolSize; var ClassRank GPA; run; r *Using a BY statement.*; *Sort the data first*; title2 'Sort the dataset by SchoolSize'; proc sort data=SASdata.College out =College_sort2; by SchoolSize; run; r *Compute the desired statistics*; proc means data=College_sort2 mean median; by SchoolSize ; var ClassRank GPA; run;...
View Full Document

Page1 / 2

p2_1_abc - proc sort data=SASdata.College out...

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

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