Summary Procedures for Derived Variables
Summarizing Derived Variables
Numeric Variable: Age
- Age is a numeric variable.
- The appropriate procedure for summarizing numeric variables like age is the
PROC MEANS procedure. PROC MEANS generates summary statistics such as:- n (number of observations)
- Mean
- Standard deviation
- Minimum value
- Maximum value
- In SAS code,
PROC MEANS is used to obtain these statistics for the variable age.
Categorical Variable: Sex
- Sex is a categorical variable with character type values.
- The categories are male and female.
- For categorical variables like sex, the
PROC FREQ procedure is used to obtain summary statistics. PROC FREQ generates:- Counts (number of occurrences of each category)
- Percentages (percentage of each category)
- This section of the table (section number two) containing counts and percentages will be built using the
PROC FREQ procedure on the sex variable.
Categorical Variable: Race
- Race is similar to sex; it is categorical and of character type.
- It contains categories representing various races of the subjects.
- The
PROC FREQ procedure is also used to obtain the data portion for this section. - This procedure generates:
- Counts (number of occurrences of each race)
- Percentages (percentage of each race)