Statistical Topic  Example in SAS Code

Example in R Code

Regression with Qualitative Predictors 
SAS example: (Insurance Innovation data & Shirt data)

R example: (Insurance Innovation data & Shirt data)

SingleFactor ANOVA 
SAS example: (Kenton Foods data)

R example: (Kenton Foods data)

Regression Approach to ANOVA model 
SAS example: (Kenton Foods data)

R example: (Kenton Foods data)

Investigation of Treatment Means 
SAS example: (Kenton Foods data)

R example: (Kenton Foods data)

Checking ANOVA Model Assumptions 
SAS example: (Kenton Foods data)

R example: (Kenton Foods data)

TwoFactor ANOVA 
SAS example: (Castle Bakery data)

R example: (Castle Bakery data)

Investigation of Factor Effects (No Interaction) 
SAS example: (Castle Bakery data)

R example: (Castle Bakery data)

Investigation of Factor Effects (With Interaction) 
SAS example: (Melon data)

R example: (Melon data)

TwoFactor ANOVA With One Observation per Cell 
SAS example: (Insurance data)

R example: (Insurance data)

TwoFactor ANOVA With Unequal Cell Sample Sizes 
SAS example: (Growth data)
(SAS example includes emptycell analysis)

R example: (Growth data)

ThreeFactor ANOVA 
SAS example: (stress data)

R example: (stress data)

RandomEffects Model 
SAS example: (Apex Enterprises data)

R example: (Apex Enterprises data)

MixedEffects Model 
SAS example: (training data)

R example: (training data)

MixedEffects Model with Unbalanced Data 
SAS example: (Sheffield data)



Randomized Complete Block Design 
SAS example: (executive data)

R example: (executive data)

Generalized Random Block Design 
SAS example: (task completion data)

R example: (task completion data)

Balanced Incomplete Block Design 
SAS example: (taste test data)

R example: (taste test data)

Latin Square Design 
SAS example: (bank teller data)

R example: (bank teller data)

SingleFactor Repeated Measures 
SAS example: (wine judging data)

R example: (wine judging data)

TwoFactor Repeated Measures 
SAS example: (shoe data)



Repeated Measures: Different Approaches 
SAS example: (dental data)



Distributionfree Tests in ANOVA
(KruskalWallis Test & multiple comparisons) 
SAS example: (soil data)

R example: (soil data)

Distributionfree Tests for RCBD
(Friedman Test) 
SAS example: (soybean data)
SAS example: (windspeed data)

R example: (soybean data)
R example: (windspeed data)

Analysis of Covariance 
SAS example: (cracker data)

R example: (cracker data)

Nested Design 
SAS example: (training school data)

R example: (training school data)

Weighted Least Squares 
SAS example (blood pressure data)

R example (blood pressure data)

Ridge and LASSO Regression 
SAS example (body fat data)

R example (body fat data)

Robust Regression 
SAS example (math proficiency data)

R example (math proficiency data)

Bootstrap in Regression 


R example: (Toluca and blood pressure data)

Piecewise Regression 
SAS example: (raw materials data)

R example: (raw materials data)

Nonlinear Regression 
SAS example (injured patients data)

R example (injured patients data)

Simple Logistic Regression 
SAS example (programming task data)

R example (programming task data)

Multiple Logistic Regression 
SAS example (disease outbreak data)

R example (disease outbreak data)

Poisson (Count) Regression 
SAS example (Miller lumber data)

R example (Miller lumber data)

Nonparametric Regression: Kernel Regression 


R example (simulated & Old Faithful data)

Nonparametric Regression: Regression with Splines 
SAS example (simulated data)

R example (simulated & Old Faithful data)

Regression Trees and Random Forests 


R example (Boston housing & admissions data)

Regression with Time Series 
SAS example (Blaisdell data)

R example (Blaisdell data)

Missing Data Methods 
SAS example (Dental and NLS with missing data)

R example (NLS with missing data)

1 × 2 Contingency Tables
(Inference about binomial probability)
(ztest/CI and Binomial test) 
SAS example: (driver's test data)

R example: (driver's test data)

1 × c Contingency Tables
(Inference about multinomial probabilities)
(Chisquare goodnessoffit test) 
SAS example: (blood types data)

R example: (blood types data)

2 × 2 Contingency Tables
(Comparing 2 proportions, independent samples)
(ztest/CI and Fisher's Exact test) 
SAS example: (trees data)

R example: (trees data)

2 × 2 Contingency Tables
(Comparing 2 proportions, paired samples)
(McNemar's test) 
SAS example: (ice cream data)

R example: (ice cream data)

r × c Contingency Tables
(Chisquare test for independence &
Chisquare test for homogeneity) 
SAS example: (snoring data & voter data)

R example: (snoring data & voter data)

Loglinear Models 


R example (various data sets)

Multicategory Logistic Regression 
SAS example (pregnancy duration data set)


