SAS PROCs and Output for Fuel Economy Experiment
DATA MPG;
INPUT VEHICLE $ MPG @@;
CARDS;
M 23.8 M 24.7 M 25.1 M 24.7 M 24.5 M 24.8 M 25.0 M 25.0
O 18.6 O 18.9 O 19.2 O 19.2 O 19.3 O 19.7 O 19.7 O 19.8
P 23.9 P 23.3 P 24.1 P 23.3 P 24.0 P 24.7 P 25.0 P 25.3
V 40.1 V 40.1 V 40.5 V 40.4 V 40.9 V 41.8 V 42.0 V 43.0
PROC ANOVA;
CLASS VEHICLE;
MODEL MPG = VEHICLE;
MEANS VEHICLE;
MEANS VEHICLE/LSD BON;
RUN;
The $ after VEHICLE in the INPUT statement indicates to SAS that the
data for VEHICLE will be letters not numbers. PROC ANOVA performs
an analysis of variance. The CLASS statement is used to identify
the grouping (or classification) variable. The MODEL statement is
of the form RESPONSE = PREDICTOR. The MEANS statement asks SAS to
compute means and standard deviation for each level of VEHICLE. The
/LSD BON, at the end of the MEANS statement performs multiple
comparisons of means using Fisher's Least Significant Difference
and the BONferroni method.
Analysis of Variance Procedure
Class Level Information
Class Levels Values
VEHICLE 4 M O P V
Number of observations in data set = 32
Dependent Variable: MPG
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 3 2166.46000 722.15333 1434.06 0.0001
Error 28 14.10000 0.50357
Corrected Total 31 2180.56000
R-Square C.V. Root MSE MPG Mean
0.993534 2.596991 0.70963 27.3250
Source DF Anova SS Mean Square F Value Pr > F
VEHICLE 3 2166.46000 722.15333 1434.06 0.0001
Level of ----------------MPG---------------
VEHICLE N Mean SD
M 8 24.7000000 0.41403934
O 8 19.3000000 0.42088342
P 8 24.2000000 0.74258237
V 8 41.1000000 1.05559733
T tests (LSD) for variable: MPG
NOTE: This test controls the type I comparisonwise error rate not
the experimentwise error rate.
Alpha= 0.05 df= 28 MSE= 0.503571
Critical Value of T= 2.05
Least Significant Difference= 0.7268
Means with the same letter are not significantly different.
T Grouping Mean N VEHICLE
A 41.1000 8 V
B 24.7000 8 M
B
B 24.2000 8 P
C 19.3000 8 O
Bonferroni (Dunn) T tests for variable: MPG
NOTE: This test controls the type I experimentwise error rate, but
generally has a higher type II error rate than REGWQ.
Alpha= 0.05 df= 28 MSE= 0.503571
Critical Value of T= 2.84
Minimum Significant Difference= 1.0073
Means with the same letter are not significantly different.
Bon Grouping Mean N VEHICLE
A 41.1000 8 V
B 24.7000 8 M
B
B 24.2000 8 P
C 19.3000 8 O