

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















Proc Means The Friendliest PROC Jayson H. Shurgold
Line by line instructions primarily used to manipulate data Pre-existing programs that generate specific outcomes
PROC MEANS Data=Library.Example1 N Mean Median Min Max MaxDec = 2; VAR Age; CLASS Gender; WHERE BirthYear = 1990 ; RUN; Specify the dataset Custom Statistics^ Provide only 2 Decimals Specify the analysis variable Specify stratifications Specify conditions
PROC MEANS Data=Library.Example1 N Mean Median Min Max MaxDec = 2; VAR Age; CLASS Gender; WHERE BirthYear = 1990 ; RUN; Must be numeric data Note the difference between ‘CLASS’ and ‘BY’ Can be any existing TEXT or NUMERIC data Can use derived conditions using functions WHERE YEAR(DateOfBirth)=
PROC MEANS Data=Library.Example2 N Mean Median Min Max Noprint nway; VAR Age; CLASS Gender; WHERE BirthYear = 1990 ; OUTPUT out = Example2_Result (drop= TYPE FREQ) n = Mean = Median = Min = Max = / autoname; RUN;
Without NOINHERIT Without NWAY With NOINHERIT With NWAY
FILENAME DDE_Dataset DDE “Excel|Sheet1!r3c3:r4c7” notab; DATA NULL; SET Example2_Result FILE DDE_Dataset PUT n ‘09’x mean ‘09’x median ‘09’x Min ‘09’x Max; RUN;
PROC MEANS Data=Library.Example2 N Mean Median Min Max Noprint Nway; VAR Age; CLASS Gender; WHERE BirthYear = 1990 ; OUTPUT out = Example2_Result (drop= TYPE FREQ) n = Mean = Median = Min = Max = / autoname; RUN; FILENAME DDE_Dataset DDE “Excel|Sheet1!r3c3:r4c7” notab; DATA NULL; SET Example2_Result FILE DDE_Dataset PUT n ‘09’x mean ‘09’x median ‘09’x Min ‘09’x Max; RUN;
PROC Means for ‘Data Manipulation’