Title 'Univariate Analysis of RBC with NORMAL and PLOT Options' The following UNIVARIATE procedure illustrates the NORMAL and PLOT options on the variable rbc of the hematology data set: PROC UNIVARIATE data = icdb.hem2 NORMAL PLOT If you have a BY statement specified as well, SAS will produce each of these plots for each level of the BY statement. To do so, go to menu Tools> Options > Preferences, and uncheck the box Use ODS Graphics under the tab Results. (Note that in SAS 9.4, you need to disable "ODS Graphics" to get the plots in the listing output. When you specify the PLOT option, SAS will produce a histogram, a box plot, and a normal probability plot for each variable specified in the VAR statement. The four test statistics calculated and presented in the output are: Shapiro-Wilk, Kolmogorov-Smirnov, Cramer-von Mises, and Anderson-Darling. When you specify the NORMAL option, SAS will compute four different test statistics for the null hypothesis that the values of the variable specified in the VAR statement are a random sample from a normal distribution. Here's what the first three sections of the output look like:
![proc univariate histogram rename x axis proc univariate histogram rename x axis](https://communities.sas.com/legacyfs/online/9735_pastedImage_1.png)
You should see five major sections in the output with the following headings: Moments, Basic Statistical Measures, Tests for Location Mu0 = 0, Quantiles, and Extreme Observations. Launch and run the program and review the output to familiarize yourself with the kinds of summary statistics the univariate procedure calculates.
![proc univariate histogram rename x axis proc univariate histogram rename x axis](https://i2.wp.com/stats.idre.ucla.edu/wp-content/uploads/2016/02/histog1-1.gif)
The VAR statement tells SAS to perform a univariate analysis on the variable rbc. As always, if the DATA= option is absent, SAS performs the analysis on the current data set. The DATA= option merely tells SAS on which data set you want to do a univariate analysis. Then, SAS would perform a univariate analysis for each numeric variable in the data set. The simplest version of the UNIVARIATE procedure would be one in which no VAR statement is present. The following UNIVARIATE procedure illustrates the (almost) simplest version of the procedure, in which it tells SAS to perform a univariate analysis on the red blood cell count ( rbc) variable in the icdb.hem2 data set: PROC UNIVARIATE data = icdb.hem2