Results: grapefruit2.sas

Oneway ANOVA with repeated measures: Covariance Structure Approach

Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)

The Print Procedure

Data Set WORK.GRAPE1

Obs store sales1 sales2 sales3
1 1 62.1 61.3 60.8
2 2 58.2 57.9 55.1
3 3 51.6 49.2 46.2
4 4 53.7 51.5 48.3
5 5 61.4 58.7 56.6
6 6 58.5 57.2 54.3
7 7 46.8 43.2 41.5
8 8 51.2 49.8 47.9

Oneway ANOVA with repeated measures: Covariance Structure Approach

Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)

Data set with one case per observation

The Print Procedure

Data Set WORK.GRAPE2

Obs store sales1 sales2 sales3 price sales
1 1 62.1 61.3 60.8 1 62.1
2 1 62.1 61.3 60.8 2 61.3
3 1 62.1 61.3 60.8 3 60.8
4 2 58.2 57.9 55.1 1 58.2
5 2 58.2 57.9 55.1 2 57.9
6 2 58.2 57.9 55.1 3 55.1
7 3 51.6 49.2 46.2 1 51.6
8 3 51.6 49.2 46.2 2 49.2
9 3 51.6 49.2 46.2 3 46.2
10 4 53.7 51.5 48.3 1 53.7
11 4 53.7 51.5 48.3 2 51.5
12 4 53.7 51.5 48.3 3 48.3
13 5 61.4 58.7 56.6 1 61.4
14 5 61.4 58.7 56.6 2 58.7
15 5 61.4 58.7 56.6 3 56.6
16 6 58.5 57.2 54.3 1 58.5
17 6 58.5 57.2 54.3 2 57.2
18 6 58.5 57.2 54.3 3 54.3
19 7 46.8 43.2 41.5 1 46.8
20 7 46.8 43.2 41.5 2 43.2
21 7 46.8 43.2 41.5 3 41.5
22 8 51.2 49.8 47.9 1 51.2
23 8 51.2 49.8 47.9 2 49.8
24 8 51.2 49.8 47.9 3 47.9

Oneway ANOVA with repeated measures: Covariance Structure Approach

Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)

Data set with one case per observation

The Print Procedure

Data Set WORK.GRAPE3

Obs store price sales
1 1 1 62.1
2 1 2 61.3
3 1 3 60.8
4 2 1 58.2
5 2 2 57.9
6 2 3 55.1
7 3 1 51.6
8 3 2 49.2
9 3 3 46.2
10 4 1 53.7
11 4 2 51.5
12 4 3 48.3
13 5 1 61.4
14 5 2 58.7
15 5 3 56.6
16 6 1 58.5
17 6 2 57.2
18 6 3 54.3
19 7 1 46.8
20 7 2 43.2
21 7 3 41.5
22 8 1 51.2
23 8 2 49.8
24 8 3 47.9

Oneway ANOVA with repeated measures: Covariance Structure Approach

Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)

Proc mixed with unknown covariance structure and lsmeans

Compare F = 29.66, p = 0.0008

The Mixed Procedure

The Mixed Procedure

Model Information

Model Information
Data Set WORK.GRAPE3
Dependent Variable sales
Covariance Structure Unstructured
Subject Effect store
Estimation Method REML
Residual Variance Method None
Fixed Effects SE Method Model-Based
Degrees of Freedom Method Between-Within

Class Level Information

Class Level Information
Class Levels Values
price 3 1 2 3

Dimensions

Dimensions
Covariance Parameters 6
Columns in X 4
Columns in Z 0
Subjects 8
Max Obs per Subject 3

Number of Observations

Number of Observations
Number of Observations Read 24
Number of Observations Used 24
Number of Observations Not Used 0

Iteration History

Iteration History
Iteration Evaluations -2 Res Log Like Criterion
0 1 141.05309845  
1 1 86.03317486 0.00000000

Convergence Status

Convergence criteria met.

Estimated R Matrix for Subject 1

Estimated R Matrix for Subject 1
Row Col1 Col2 Col3
1 29.6084 33.0114 34.0598
2 33.0114 37.5886 38.7000
3 34.0598 38.7000 40.6255

Covariance Parameter Estimates

Covariance Parameter Estimates
Cov Parm Subject Estimate
UN(1,1) store 29.6084
UN(2,1) store 33.0114
UN(2,2) store 37.5886
UN(3,1) store 34.0598
UN(3,2) store 38.7000
UN(3,3) store 40.6255

Fit Statistics

Fit Statistics
-2 Res Log Likelihood 86.0
AIC (Smaller is Better) 98.0
AICC (Smaller is Better) 104.0
BIC (Smaller is Better) 98.5

Null Model Likelihood Ratio Test

Null Model Likelihood Ratio Test
DF Chi-Square Pr > ChiSq
5 55.02 <.0001

Type 3 Tests of Fixed Effects

Type 3 Tests of Fixed Effects
Effect Num DF Den DF F Value Pr > F
price 2 7 34.60 0.0002

Least Squares Means

Least Squares Means
Effect price Estimate Standard
Error
DF t Value Pr > |t|
price 1 55.4375 1.9238 7 28.82 <.0001
price 2 53.6000 2.1676 7 24.73 <.0001
price 3 51.3375 2.2535 7 22.78 <.0001

Differences of Least Squares Means

Differences of Least Squares Means
Effect price _price Estimate Standard
Error
DF t Value Pr > |t| Adjustment Adj P
price 1 2 1.8375 0.3831 7 4.80 0.0020 Bonferroni 0.0059
price 1 3 4.1000 0.5141 7 7.98 <.0001 Bonferroni 0.0003
price 2 3 2.2625 0.3190 7 7.09 0.0002 Bonferroni 0.0006

Oneway ANOVA with repeated measures: Covariance Structure Approach

Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)

Proc mixed with compound symmetry cov. structure and contrasts

Compare F = 49.35, p < 0.0001

The Mixed Procedure

The Mixed Procedure

Model Information

Model Information
Data Set WORK.GRAPE3
Dependent Variable sales
Covariance Structure Compound Symmetry
Subject Effect store
Estimation Method REML
Residual Variance Method Profile
Fixed Effects SE Method Model-Based
Degrees of Freedom Method Between-Within

Class Level Information

Class Level Information
Class Levels Values
price 3 1 2 3

Dimensions

Dimensions
Covariance Parameters 2
Columns in X 4
Columns in Z 0
Subjects 8
Max Obs per Subject 3

Number of Observations

Number of Observations
Number of Observations Read 24
Number of Observations Used 24
Number of Observations Not Used 0

Iteration History

Iteration History
Iteration Evaluations -2 Res Log Like Criterion
0 1 141.05309845  
1 1 93.18551859 0.00000000

Convergence Status

Convergence criteria met.

Estimated R Matrix for Subject 1

Estimated R Matrix for Subject 1
Row Col1 Col2 Col3
1 35.9408 35.2571 35.2571
2 35.2571 35.9408 35.2571
3 35.2571 35.2571 35.9408

Covariance Parameter Estimates

Covariance Parameter Estimates
Cov Parm Subject Estimate
CS store 35.2571
Residual   0.6838

Fit Statistics

Fit Statistics
-2 Res Log Likelihood 93.2
AIC (Smaller is Better) 97.2
AICC (Smaller is Better) 97.9
BIC (Smaller is Better) 97.3

Null Model Likelihood Ratio Test

Null Model Likelihood Ratio Test
DF Chi-Square Pr > ChiSq
1 47.87 <.0001

Type 3 Tests of Fixed Effects

Type 3 Tests of Fixed Effects
Effect Num DF Den DF F Value Pr > F
price 2 14 49.35 <.0001

Contrasts

Contrasts
Label Num DF Den DF F Value Pr > F
1vs2 1 14 19.75 0.0006
1vs3 1 14 98.34 <.0001
2vs3 1 14 29.95 <.0001