East Carolina University
Department of Psychology
Here are links to SAS program files. They are in plain text files. Where the data are not included in the program, you can find the data file at StatData. For such programs, I have included the name of the data file, within parentheses, in the list below. You can also look at the INFILE statement in the SAS program to learn the name of the data file.
SAS for Windows -- How to use these program files with SAS for Windows.
Alpha -- Cronbach's Alpha and Maximized Lambda4 (KJ.dat).
ANCOV1 -- One-Way Analysis of Covariance.
ANCOV2.old -- Two-Way ANCOV with data from an earlier edition of Howell.
ANCOV2 -- Two-Way ANCOV
ANOVA1 -- One-Way ANOVA: Pairwise Comparisons, Orthogonal Contrasts, Welch Test, Tests of Homogeneity of Variance, & Trend Analysis.
ANOVA1-01 -- One-Way ANOVA with Pairwise Comparisons.
ANOVA1b -- One-Way ANOVA With Orthogonal Contrasts.
ANOVA1-LS -- One-Way ANOVA with Dummy Variable Coding, Effects Coding, and Contrast Coding
ANOVA2 -- Two-WAY, Equal Cell Sizes, Independent Samples ANOVA.
ANOVA2_Fixed-x-Random -- Howell, Methods, 7th Edition, pages 432-434.
ANOVA2_Fixed-x-Random_Nested -- Howell, Methods, 7th Edition, pages 435-437.
ANOVA2-LS-Eq -- Two-Way Orthogonal Least Squares ANOVA, Effects Coding.
ANOVA2-LS-UnEq -- Two-Way Nonorthogonal Least Squares ANOVA, Effects Coding.
ANOVA3 -- Three-Way, Equal Ns, Independent Samples ANOVA.
ANOVA-Interact2x2 -- 2 x 2 ANOVA done as one-way with contrasts.
ANOVA-Interact2x3.sas -- 2 x 3 ANVOA done as one-way with contrasts; interaction contrasts.
ARC -- Format and Data Steps to Read ARC.dat and produce scale scores.
Area_x_Delay -- 3 x 3 Factorial ANOVA.
ART-INDT -- Approximate Randomization Test, Equality of Means, 2 Independent Samples (ART-INDT.dat).
Biserial -- biserial correlation coefficient
Bootstrap_Mean-Median -- Confidence Intervals
CHISQ -- Contingency Table Analysis (Howell.dat).
CMH - the Cochran-Mantel-Haenszel Statistic
Concatenate -- Simple example of how to concatenate (join) character variables.
Conf-Interval-Contrast -- Confidence Interval for standardized contrast.
Confidence Interval for Standard Difference Between mu and Hypothesized mu.
Conf-Interval-d1 -- Confidence Interval for d, one sample or two correlated samples (standardized by SD of diff scores).
Confidence Interval for d, Two or More Independent Samples
Conf-Interval-d2 -- Confidence Interval for d, standardized difference between population means, two independent samples.
Conf-Interval-d2-F -- ditto, but input test statistic is F rather than t.
Conf-Interval-d2-Algina -- ditto, but input is means and standard deviations
Conf-Interval-kIndependentSamples_Algina -- for k independent samples
Confidence Interval for d, Two or More Related Samples
Conf-Interval-r -- Confidence Interval for Pearson r.
Conf-Interval-R2-Regr -- Confidence Interval for h2, R2, ANOVA or regression, fixed effects.
Confound -- Matching and ANCOV with Confounded Variables, contrived data.
CorrRegr -- Correlation and Regression Analysis
Curvi -- Polynomial Regression, Ladybugs.
d-EqN -- estimate Cohen's d when sample sizes are equal, independent or correlated samples
DFA2 -- Discriminant Function Analysis, 2 Groups (Harass90.dat).
g1g2 -- Illustrates use of PROC STANDARD and computation of g1 and g2 estimates of skewness and kurtosis.
Hines -- Liza Hines' Thesis: Misbehavior in the Computer Lab (Hines.dat).
Howl343 -- Exercises 11.3, 13.11, and 13.12, 4th edition, Statistical Methods.
If_Then -- Illustration of problem created by forgetting that SAS codes missing values with extreme negative numbers.
INTROQ1 -- Basic descriptive statistics on the INTROQ questionnaire my undergraduate students have completed (IntroQ.dat).
Kappa -- Cohen's kappa.
Kendall-patches -- Kendall's Coefficient of Concordance.
KR20 -- Kuder-Richardson 20.
Kurtosis_Beta2 -- illustrates the computation of population kurtosis
Kurtosis-Normal -- Sampling Distributions of Skewness and Kurtosis.
Kurtosis-T -- Kurtosis of t with varying degrees of freedom.
Kurtosis-Uniform -- Kurtosis of a uniform distribution.
Lambda4 -- Estimating Maximized Lambda4 (KJ.dat)).
Logistic -- Logistic Regression (ARC.dat)
MANOVA1 -- One-Way MANOVA (Plaster.dat)).
MANOVA2 -- Two-Way MANOVA (Plaster.dat)).
MAN_1W1B -- The Multivariate Approach to a Mixed ANOVA: One Within Subjects and One Between Subjects Factor (Tunnel4.dat).
MAN_1W2B -- Multivariate Approach to a Mixed ANOVA: One Within-Subjects and Two Between-Subjects Factors(MAN_1W2B.dat)).
MAN_2W1B -- Multivariate Approach to a Mixed ANOVA: Two Within-Subjects and One Between-Subjects Factor (MAN_2W1B.dat)).
MAN_3W -- Three-Way All Within-Subjects ANOVA.
MAN_RM1 -- Multivariate Approach to One-Way Repeated Measures ANOVA (TUNNEL4b.DAT).
McDonald -- You'll have to run this program to discover what it does. Trust me, it does nothing nasty, just silly.
Merge -- Example Of Merging Two Files With Data From Same Subjects, data within program file.
Merge2 -- Merging Two Files, Data in External Files
Moderate -- Continuous Moderator Variables in Multiple Regression Analysis (MODERATE.DAT).
MReg -- Multiple Regression with Four Predictors (MULTREG.dat).
MReg_Mult-Imput -- Multiple Imputation Multiple Regression. See Multiple Regression with Data from Multiple Imputations
Murder -- Multiple Regression.
Music -- Using SAS as a music synthesizer.
NewViewer -- Direct new output to a new htm file (SAS 9.3)
Nonpar -- Nonparametric analyses.
OldMac.sas -- what you get if your are using an old Mac computer
P -- Using SAS to obtain exact p values.
Partial -- Partial correlation/regression coefficients.
PCA-DFA -- Principal Components Discriminant Function Analysis (PCA-DFA.dat)
Polychoric -- polychoric and tetrachoric correlation coefficient
Polychoric2Matrix -- compute polychoric/tetrachoric coefficents and write them to a matrix (EPQ.xlsx)
Potthoff Analysis -- comparing groups on the slope and intercept for predicting Y from X.
Promax -- Promax Rotation, Factor Analysis.
Recode -- Example of use of array to recode numeric value to missing.
Reflect -- See How Reflection Affects Skewness.
SAS-2 -- From my document "An Introduction to SAS for Windows" (SAS-2.dat)
Simulate-T1S -- Simulate data for one-sample t test.
Spearman -- Spearman rho computed on data from perfect monotonic (log) relationship.
SS1234 -- PROC GLM Sums-of-Squares: Types I, II, III & IV (SS1234.dat).
Starling -- Plot With Discriminant Function Line Overlay, Minot's (Starling.dat).
Stepwise -- Stepwise Multiple Regression (MultReg.dat).
T -- One-sample, correlated and independent t tests (Howell.dat, Tunnel2.dat)
Tetrachoric -- the tetrachoric correlation coefficient (Potthoff.dat)
Transform -- demonstration of effect (upon shape of distribution) of linear and monotonic nonlinear transformations
tPower -- This Program Produces Plots of The t-Distributions For a Given Sample Size Under the Null and Alternate Hypotheses.
Trend2 -- Two-Way Trend Analysis.
Variables-Cases-R. How R2 is inflated when there are few cases relative to the number of predictor variables in the model.
Voles -- Sexual Dimorphism, Testis Size, and Mating Systems in Voles.
Weights -- ANCOV for gender differences in weight, adjusted for height, real data.
WilcoxonSignedRanks -- Wilcoxon's Signed Ranks Test for Matched Pairs (WilcoxonSignedRanks.txt).
WS-ANOVA.sas -- One-Way Repeated Measures ANOVA; Data from page 456 of 4th ed. of Howell's Statistical Methods (ANOVA_RM.grad).
WS-ANOVA-01.sas -- One-Way Repeated Measures ANOVA; Data from page 359 of 4th ed. of Howell's Fundamental Statistics (ANOVA_RM.data).
XXRELIAB -- Reliability Demonstration via Monte Carlo.
ZPF -- Comparing Correlated but Nonoverlapping Correlation Coefficients.
Contact Information for the Webmaster,
Dr. Karl L. Wuensch
This page most recently revised on 15-March-2018.