You can copy and paste this data step into the program editor to run the examples below. Then they are graphed together using proc greplay. To graph the distribution of only one variable, we must first create a variable which is any constant value. Records with missing values on either the horizontal or vertical axis must be excluded. The natural log of water81 is not a variable in the concord1 dataset. Below we show you how to do this manually. Merge above81 and below81 datasets and define two x,y points for a reference line.

A dataset sorted by water81 was created previously. Chapter 1 uses the concord1 data. The variable water79 has missing values. The statistics for water79 and water80 are also computed here for later use. Sort the data by the variable you wish to plot, keeping only the plot variable to save sorting time and disk space. Merge above81 and below81 datasets and define two x,y points for a reference line.

However, we can compute the distances to points above and below the median to plot the graph manually. The statistics for water79 and water80 are also computed here for later use.

The two plots in this figure are first graphed separately and output to a graphics catalog. This flag, along with the other statistics, are output to global macro variables, accessible in any later data step. We use it here to create a fraction variable. Use the means procedure to get the sample means and standard deviations for and water use pages Use the histogram statement with the normal option in proc univariate to graph the plot. The variable water79 has missing values.

The natural log of water81 is not a variable in the concord1 dataset.

### PROC UNIVARIATE: Creating Plots for Line Printer Output

Quantiles of water use:. Sort the data by the variable you wish to plot, keeping only the plot variable to save sorting time and disk space. To graph the distribution of only one variable, we must first create a variable which is any constant value. You can copy and paste this data step into the program editor to run the examples below. Merge the quantiles one-to-one and define two x80,y80 points and two x81,y81 points for the reference lines.

Then they are graphed together using proc greplay. Records with missing values on either the horizontal or vertical axis must be excluded. Otherwise, the quantiles will mis-merge in a later data step.

The median and percentiles on pages are also computed here, but not all the output plt the univariate procedure is listed. Compute the distances above and below the median and output to two datasets based on whether the points are above or below. SAS does not have a procedure or graph option for quantile plots. This is not necessary to graph a boxplot of water81 by some other variable.

## The UNIVARIATE Procedure

Compute the medians and sample sizes and output to a dataset. SAS does not have a procedure or graph option to produce a symmetry plot.

We create a blank axis called axis2 to use as the horizontal axis, then use proc boxplot.

SAS does not have a procedure or graph option to produce a Quantile-Quantile plot. Below we show you how to do this manually. Delete the contents of the graphics catalog named mycat. Chapter 1 uses the concord1 data. We will again show how to plot the graph manually here.

So first create the variable anx the log function. How we calculate the distance above and below the median depends on whether n is even or odd. A dataset sorted by water81 was created previously. Merge above81 and below81 datasets and define two x,y points for a reference line.