Proc Univariate

Contents Index


Proc univariate performs parametric and nonparametric analysis of a sample from a single population. See also proc means, proc ttest, proc glm, and proc npar1way.

Printed output for each variable includes the sample mean, the sample standard deviation, the t statistic and two sided p-value for a test of zero population mean, the sign statistic and two sided p-value for a test of zero population median, the Wilcoxon signed rank test statistic and two sided p-value for a test of zero population median, the quartiles and interquartile range, and some percentiles (1, 5, 10, 90, 95, 99). Other options listed below may produce additional output. Example:

proc univariate
	data=stuff
	freq
	normal
	plot
	vardef=df;
var weight height;

The data= option specifies the SAS data set to be analyzed.

The freq option generates a frequency table showing the values, frequencies, percentages, and cumulative frequencies for each variable.

The normal option computes the Shapiro-Wilk or Kolmogorov test of the hypothesis that the data comes from a normal population. The p-value of the test is also printed.

The plot option produces a stem and leaf plot, box plot, and normal probability (quantile-quantile) plot for each variable. These are crude plots which do not use presentation quality graphics.

The vardef= option specifies the divisor used in computing the sample variance. vardef=df, the default, uses the degrees of freedom n-1; vardef=n uses the sample size n.

The optional var statement restricts the analysis to specific variables in the data set. If the var statement is not used, all numeric variables in the data set are analyzed.

Other options include computing weighted averages with arbitrary weights, using value-frequency pairs to specify the raw data, computing additional percentiles, and specifying the method used to compute percentiles. The procedure can create a new data set containing any of the computed quantities. A by statement can also be used. For further information see the SAS Procedures Guide.


Contents Index

Copyright © 1997 by Jerry Alan Veeh. All rights reserved.