*Copyright @ www.mycsg.in;


Create some input datasets

Obtaining the descriptive statistics for analyis variables into a dataset

Question Answer
How do we specify the name of the input dataset to be used by proc means? We need to specify the name of the input dataset using data= option on proc means statement
What happens if we do not provide the data= option? The last created dataset in the current SAS session will be used as input for proc means
How do we specify the variables for which descriptive statistics are requested? We need to specify the variables for which statistics are requested on the VAR statement
What happens if we do not provide VAR statement? If we do not provide VAR statement SAS provides us the descriptive statistics for all numeric variables present in the input dataset
How do we specify the name of the output dataset to store the descriptive statistics? We need to specify the name of the output dataset in output statement with out= option?
What happens if we do not provide the output statement? If we do not provide the output statement, output dataset will not be created but the descriptive statistics will be displayed in the output window. SAS will display the descriptive statistics in the output window irrespective of the presence of an output statement.

Create a dataset named stats01 to store the default descriptive statistics of all numeric variables of class01 dataset

Create a dataset named stats02 to store the default statistics of height variable of class01 dataset

Create a dataset named stats03 to store the default statistics of height and weight variables of class01 dataset

Create a dataset named stats04 to store N,Mean and Median of height variable of class01 dataset

Create a dataset named stats05 to store N,Mean and Standard Deviation of height and weight variable of class01 dataset

Create a dataset named stats06 to store N,Mean and Median of age, height and weight variable of class01 dataset

Create a dataset named stats07 to store N,Mean and Median of age, height and weight variable of class01 dataset using autoname option

Create a dataset named stats08 to store N,Mean,Std of height variable within each Age group of class01 dataset

Create a dataset named stats09 to store N,Mean,Std of height variable within each Age and Sex group of class01 dataset

Create a dataset named stats10 to store N,Mean,Std of height variable within each Age and Sex group using CLASS statement