1          ************************************************************************;
2 *** EXST7034 Example 1 using PC-SAS - Airline vial breakage ***;
3 *** Problem from Neter, Kutner, Nachtsheim & Wasserman 1996, #1.21 ***;
4 ************************************************************************;
5 OPTIONS LS=88 PS=256 NOCENTER NODATE NONUMBER;
6 DATA ONE; INFILE CARDS MISSOVER;
7 TITLE1 'EXST7034 - Example 1 : Airline vial breakage - NKNW Example 1.21';
8 * LABEL X = 'Breakage per 1000 vials';
9 * LABEL Y = 'Number of airline transfers';
10 INPUT X Y;
11 ANOTHERX = X;
12 CARDS;
NOTE: The data set WORK.ONE has 11 observations and 3 variables.
NOTE: DATA statement used:
real time 0.06 seconds
cpu time 0.06 seconds
24 ;

38 proc mixed DATA=ONE; CLASSES AnotherX;
39 title2 'Analysis of Covariance using PROC MIXED';
40 model Y = X anotherX/ htype=1 3 DDFM=Satterthwaite solution;
41 run;
NOTE: 1 observation is not included because of missing values.
NOTE: The PROCEDURE MIXED printed page 11.
NOTE: PROCEDURE MIXED used:
real time 0.06 seconds
cpu time 0.06 seconds


EXST7034 - Example 1 : Airline vial breakage - NKNW Example 1.21
Analysis of Covariance using PROC MIXED

The Mixed Procedure

Model Information
Data Set WORK.ONE
Dependent Variable Y
Covariance Structure Diagonal
Estimation Method REML
Residual Variance Method Profile
Fixed Effects SE Method Model-Based
Degrees of Freedom Method Residual

Class Level Information
Class Levels Values
ANOTHERX 5 0 1 2 3 4

Dimensions
Covariance Parameters 1
Columns in X 6
Columns in Z 0
Subjects 1
Max Obs Per Subject 11
Observations Used 10
Observations Not Used 1
Total Observations 11

Covariance Parameter Estimates
Cov Parm Estimate
Residual 2.7778

Fit Statistics
-2 Res Log Likelihood 26.3
AIC (smaller is better) 28.3
AICC (smaller is better) 29.3
BIC (smaller is better) 28.1

Solution for Fixed Effects
Standard
Effect ANOTHERX Estimate Error DF t Value Pr > |t|
Intercept 10.0000 4.8591 6 2.06 0.0853
X 4.0000 2.0412 6 1.96 0.0978
ANOTHERX 0 6.37E-14 4.9301 6 0.00 1.0000
ANOTHERX 1 0.6667 3.0429 6 0.22 0.8338
ANOTHERX 2 0 . . . .
ANOTHERX 3 0 . . . .

Type 1 Tests of Fixed Effects
Effect Num DF Den DF F Value Pr > F
X 1 6 57.60 0.0003
ANOTHERX 2 6 0.17 0.8492

Type 3 Tests of Fixed Effects
Effect Num DF Den DF F Value Pr > F
X 0 . . .
ANOTHERX 2 6 0.17 0.8492



42 PROC GLM DATA=ONE; TITLE2 'Lack of Fit - Regression Analysis with GLM';
43 MODEL Y = X; RUN;
NOTE: The PROCEDURE GLM printed pages 12-13.
NOTE: PROCEDURE GLM used:
real time 0.08 seconds
cpu time 0.07 seconds
NOTE: The PROCEDURE GLM printed pages 12-13.
NOTE: PROCEDURE GLM used:
real time 0.08 seconds
cpu time 0.07 seconds

EXST7034 - Example 1 : Airline vial breakage - NKNW Example 1.21
Lack of Fit - Regression Analysis with GLM

The GLM Procedure
Number of observations 11

Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 1 160.0000000 160.0000000 72.73 <.0001
Error 8 17.6000000 2.2000000
Corrected Total 9 177.6000000

R-Square Coeff Var Root MSE Y Mean
0.900901 10.44535 1.483240 14.20000

Source DF Type I SS Mean Square F Value Pr > F
X 1 160.0000000 160.0000000 72.73 <.0001

Source DF Type III SS Mean Square F Value Pr > F
X 1 160.0000000 160.0000000 72.73 <.0001

Standard
Parameter Estimate Error t Value Pr > |t|
Intercept 10.20000000 0.66332496 15.38 <.0001
X 4.00000000 0.46904158 8.53 <.0001



44 PROC GLM DATA=ONE; TITLE2 'Lack of Fit in Regression as ANOVA in GLM';
45 CLASSES X; MODEL Y = X; RUN;
NOTE: The PROCEDURE GLM printed pages 14-15.
NOTE: PROCEDURE GLM used: real time 0.09 seconds
cpu time 0.09 seconds

EXST7034 - Example 1 : Airline vial breakage - NKNW Example 1.21
Lack of Fit in Regression as ANOVA in GLM

The GLM Procedure
Class Level Information
Class Levels Values
X 5 0 1 2 3 4
Number of observations 11

Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 3 160.9333333 53.6444444 19.31 0.0017
Error 6 16.6666667 2.7777778
Corrected Total 9 177.6000000

R-Square Coeff Var Root MSE Y Mean
0.906156 11.73709 1.666667 14.20000

Source DF Type I SS Mean Square F Value Pr > F
X 3 160.9333333 53.6444444 19.31 0.0017

Source DF Type III SS Mean Square F Value Pr > F
X 3 160.9333333 53.6444444 19.31 0.0017




General Linear Hypothesis test
d.f. SS MS F P>F
Reduced model 8 17.6000000
Full model 6 16.6666667
---------------------------------------------------------------
Difference 2 0.93333333 0.46666667 0.17 0.8492
Full model 6 16.6666667 2.77777778



46 PROC GLM DATA=ONE; TITLE2 'Lack of Fit as GLM Regression Analysis';
47 CLASSES ANOTHERX; MODEL Y = X ANOTHERX; RUN;
NOTE: The PROCEDURE GLM printed pages 16-17.
NOTE: PROCEDURE GLM used:
real time 0.08 seconds
cpu time 0.08 seconds

EXST7034 - Example 1 : Airline vial breakage - NKNW Example 1.21
Lack of Fit as GLM Regression Analysis

The GLM Procedure
Class Level Information
Class Levels Values
ANOTHERX 5 0 1 2 3 4
Number of observations 11

Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 3 160.9333333 53.6444444 19.31 0.0017
Error 6 16.6666667 2.7777778
Corrected Total 9 177.6000000

R-Square Coeff Var Root MSE Y Mean
0.906156 11.73709 1.666667 14.20000

Source DF Type I SS Mean Square F Value Pr > F
X 1 160.0000000 160.0000000 57.60 0.0003
ANOTHERX 2 0.9333333 0.4666667 0.17 0.8492

Source DF Type III SS Mean Square F Value Pr > F
X 0 0.00000000 . . .
ANOTHERX 2 0.93333333 0.46666667 0.17 0.8492


48 PROC REG DATA=ONE; TITLE2 'Regression Analysis with NOINT option';
49 MODEL Y = X / noint; RUN;
NOTE: 11 observations read.
NOTE: 1 observations have missing values.
NOTE: 10 observations used in computations.

EXST7034 - Example 1 : Airline vial breakage - NKNW Example 1.21
Regression Analysis with NOINT option

The REG Procedure
Model: MODEL1
Dependent Variable: Y

NOTE: No intercept in model. R-Square is redefined.

Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 1656.20000 1656.20000 27.72 0.0005
Error 9 537.80000 59.75556
Uncorrected Total 10 2194.00000

Root MSE 7.73017 R-Square 0.7549
Dependent Mean 14.20000 Adj R-Sq 0.7276
Coeff Var 54.43783

Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
X 1 9.10000 1.72852 5.26 0.0005