SAS Statistical Procedures: From Basic Stats to Advanced Analysis
SAS earned its reputation as the gold standard for statistical analysis through its comprehensive suite of analytical procedures. Whether you are producing basic summary statistics or fitting complex mixed models, SAS has a PROC for it. This guide covers the procedures you will use most frequently in professional statistical work.
Descriptive Statistics: PROC MEANS, UNIVARIATE, FREQ
PROC MEANS calculates count, mean, standard deviation, minimum, and maximum by default. Use the OUTPUT statement to save statistics as a dataset, the BY statement for group-level statistics, and the CLASS statement for multiple grouping variables. PROC UNIVARIATE provides a much more comprehensive distribution analysis — median, quartiles, skewness, kurtosis, tests for normality, stem-and-leaf plots, and extreme value listings. For categorical variables, PROC FREQ produces frequency tables and supports chi-square tests with the CHISQ option.
Regression Analysis: PROC REG and PROC GLM
PROC REG handles ordinary least squares regression with comprehensive diagnostics — R-squared, parameter estimates, standard errors, p-values, VIF for multicollinearity, influence statistics, and residual plots. The MODEL statement uses a formula syntax: MODEL response = predictor1 predictor2;. PROC GLM (General Linear Models) extends regression to handle categorical predictors (CLASS variables) and complex ANOVA designs, including interaction terms, repeated measures, and contrast statements for specific hypothesis tests.
PROC LOGISTIC for Binary and Ordinal Outcomes
When the outcome is binary or ordinal, PROC LOGISTIC fits logistic regression models. It produces odds ratios, confidence intervals, classification tables, ROC curves, and goodness-of-fit statistics. The DESCENDING option reverses the reference level (so you model the event rather than the non-event). Stepwise, forward, and backward variable selection options are available, though manual variable selection informed by subject matter expertise is generally preferred.
Survival Analysis: PROC LIFETEST and PROC PHREG
Common in clinical and actuarial work, survival analysis examines time-to-event outcomes with censoring. PROC LIFETEST produces Kaplan-Meier survival curves and log-rank tests comparing survival between groups. PROC PHREG fits Cox proportional hazards regression models, estimating hazard ratios while controlling for covariates. The STRATA statement handles stratified analyses; time-dependent covariates can be accommodated using programming statements within PROC PHREG.
Explore our SAS macros guide to automate repetitive analyses, or see our resources page for SAS certification preparation materials.