*Copyright @ www.mycsg.in;


Create an input dataset

Obtaining descriptive statistics into an output dataset

Question Answer
How do we specify the input dataset for PROC MEANS? Use the `data=` option on the PROC MEANS statement.
What happens if we do not provide the data= option? The most recently created dataset in the current SAS session is used.
How do we specify the variables for which statistics are requested? Use the `var` statement.
What happens if we do not provide a VAR statement? SAS produces descriptive statistics for all numeric variables in the input dataset.
How do we specify the output dataset name? Use the `output` statement with the `out=` option.
What happens if we do not provide the output statement? No output dataset is created, but summary statistics are still shown in the output window.

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

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

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

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

Create a dataset named stats05 to store N, Mean, and Median of height and weight

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

Create a dataset named stats07 using the AUTONAME option

Create a dataset named stats08 to store N, Mean, and Std of height within each age group

Create a dataset named stats09 to store N, Mean, and Std of height within each sex group using CLASS

Key points to remember