![]() |
|
|
|||||||||||||||||||||||||||||||||||||||||
|
LABEL statement Objectives
LABEL statement
The LABEL statement attaches an expanded label to the variable names. The general form of the LABEL statement is: LABEL var_name = 'label text'; Example: LABEL SEX='Gender of subject'; PROC MEANS statement
Although other procedures produce univariate statistics on numeric variables, PROC MEANS is the easiest to use. PROC MEANS is almost identical to PROC SUMMARY, except that PROC SUMMARY provides no printed output, by default, whereas PROC MEANS does. Statistics are calculated for each numeric variable listed on the VAR statement. The CLASS statement allows you to have statistics calculated separately for groups of observations, such as males and females. The output from PROC MEANS is rather detailed, and can include: N, mean, standard deviation, minimum and maximum values, sums, variance, range and many others. Unlike the UNIVARIATE procedure, on the PROC MEANS statement you can select options that specify statistics you wish to have output. The general format for the MEANS procedure is: PROC MEANS options; Example: PROC MEANS MEAN STD T N RANGE; If no options are specified on the PROC MEANS statement, and no additional procedure information statements follow the PROC MEANS statement, such as a VAR statement, all statistics are produced for all variables in the data set. PROC UNIVARIATE statement
The output from PROC UNIVARIATE can be even more detailed than that of PROC MEANS, particularly with regard to the distribution of a variable. There are at least 35 statistics that can be requested as well as plots, frequency tables, paired comparison tests, tests of normality, and others. Some of the statistics available are means, standard deviation, mode, kurtosis, range, quartiles, percentiles, Student's T, and many others. The general format of the PROC UNIVARIATE statement is: PROC UNIVARIATE options; Example: PROC UNIVARIATE FREQ; The above example would produce the standard univariate output. The FREQ option on the PROC UNIVARIATE statement causes the output to also include a list of variable values, frequencies, percentages, and cumulative percentages of variable values. PROC PLOT statement
PROC PLOT graphs one variable against another producing a scatter plot. The PLOT statement designates the names of the variables to be plotted. The variable to the left of the asterisk (*) is the variable that will appear on the vertical axis. The general format of PROC PLOT is: PROC PLOT options; Example: PROC PLOT NOMISS; In the above example, missing values would be excluded from the plot and the variable AGE would appear on the vertical axis. Session 4 Exercise
|
||||||||||||||||||||||||||||||||||||||||
![]()
| © University of New Mexico -- last updated -- comments to: docs@unm.edu |