Univariate procedure

Like PROC MEANS, PROC UNIVARIATE summarizes datasets with simple statistics and tests. One main difference between the two procedures is the style of presentation. In addition to statistics, PROC UNIVARIATE also can plot the distribution of the data and test for location and normality. PROC UNIVARIATE, by default, gives most statistics without needing to list keywords.

Syntax

PROC UNIVARIATE < options > ;
  BY byvar(s);
  VAR var(s);
  CLASS var(s);
  FREQ var;
  HISTOGRAM ;
  PROBPLOT ;
  QQPLOT ;
  WEIGHT var;
  INSET < keyword (s) / options > ;
  OUTPUT < OUT=dataset statistic-keyword = newvar ... >;
  ID var(s);

RUN;
PROC UNIVARIATE options

DATA= : specifies input dataset.

ALL : requests all statistics and tables.

ALPHA= : specifies the alpha level for confidence limits.

CIBASIC : requests confidence limits.

FREQ : request a frequency table for each variable.

GOUT : specifies a SAS graphics catalog for hi-resolution graphic output.

LOCCOUNT : requests table with values for sign and signed rank test.

MODES : requests table of all modes.

MU0= : specifies null hypothesis value for mean or location parameter.

NOBYPLOT : suppresses side-by-side box plots when PLOTS option is specified.

NOPRINT : suppresses all displayed output.

NORMAL : requests normality tests.

PLOTS : requests stem-and-leaf plot, box plot and normal probability plot.

TRIMMED= : requests a table of trimmed means

WINSORIZED= : requests a table of Winsorized means.

Statements

BY : Calculates separate statistics for each bygroup.

VAR : Lists variables for analysis.

CLASS : Specifies class variables for comparative histograms.

HISTOGRAM : Hi-resolution histogram.

PROBPLOT : Hi-resolution probability plot.

QQPLOT : Hi-resolution quantile-quantile plot.

WEIGHT : Identifies a variable with the values of the weight/frequency of an observation.

INSET : Inset table of summary statistics in hi-resolution graph.

OUTPUT : Create an output dataset with specified statistics.

ID : Specify variable to be identify observation for extreme values.

Statistic keywords

Descriptive statistics: N, NMISS, NOBS, MIN, MAX, MEAN, STD, VAR, SUM, RANGE, SKEWNESS, KURTOSIS, CV, SUMWGT, STDMEAN, MODE.

Quantile statistics: P5, P10, Q1, MEDIAN, Q3, P90, P95, P99, QRANGE.

Hypothesis testing: T, PROBT, NORMAL, PROBN, MSIGN, PROBM, SIGNRANK, PROBS.

Robust statistics: GINI, MAD, SN, QN, STD_GINI, STD_MAD, STD_SN, STD_QN.