DATA Step, Macro, Functions and more

PROC VARCOMP to compute expected mean squares for FIXED effects in 3*3 Factorial design

Reply
Contributor
Posts: 66

PROC VARCOMP to compute expected mean squares for FIXED effects in 3*3 Factorial design

Dear SAS users,

 

I want to compute "variance components" for fixed effects in 2*3 Factorial Design.

 

Consider the battery life example in Montgomery`s (Design and Analysis of Experiments, 8th Edition, p. 187, 193):

/* Montgomery, 8th ed., p. 187, 193 */

DATA a;
       INPUT Material $ Temperature $ Hour;
       DATALINES;
               1 15 130
               1 15 155
               1 15 74
               1 15 180
               2 15 150
               2 15 188
               2 15 159
               2 15 126
               3 15 138
               3 15 110
               3 15 168
               3 15 160
               1 70 34
               1 70 40
               1 70 80
               1 70 75
               2 70 136
               2 70 122
               2 70 106
               2 70 115
               3 70 174
               3 70 120
               3 70 150
               3 70 139
               1 125 20
               1 125 70
               1 125 82
               1 125 58
               2 125 25
               2 125 70
               2 125 58
               2 125 45
               3 125 96
               3 125 104
               3 125 82
               3 125 60
       ;
       RUN;

PROC GLM DATA = a PLOTS = NONE;
       CLASS Material Temperature;
       MODEL Hour = Material | Temperature / SS3;
       OUTPUT OUT = a_ PREDICTED = Hour_predicted RESIDUAL = Hour_residuals STUDENT = Hour_residuals_Student;
       RUN;

 

Above I use PROC GLM, but here PROC MIXED is implemented. (But I can not see the difference.)

PROC MIXED DATA = a METHOD = TYPE3;
       CLASS Material  Temperature;
       MODEL Hour = Material | Temperature;
       RUN;

 

Then I try PROC VARCOMP to compute expected means squares:

ODS EXCLUDE ClassLevels NObs DepVar;
PROC VARCOMP METHOD = TYPE1 DATA = a SEED = 1;
  CLASS Material Temperature;
  MODEL Hour = Material | Temperature / FIXED = 3;
  RUN;

 

Here is the output:

Screenshot-2017-10-29 SAS Studio.png

 

The following is what I found out by googling (yet I appreciate your hint on a good source).

Here it is said that "The "Q" notation in the expected mean squares refers to a quadratic form in parameters of the parenthesized effect." As far as I understand "quadratic form" refers to "squared form" (i.e. a^2). Plus this review additionally explains a bit what "Q" stands for. Specifically: "SAS... [uses] the Q(~) notation in place of the coeff*Kappa^2 term". The author mentions that at the final step of  determining EMS's for balanced designs the Sigma^2 is replaced by Kappa^2 (if I'm right the Sigma^2 = Var(Error) = 675.21296 in the example).

 

But despite the information for me it is still unclear how to calculate EMS. Are the components in the parentheses equal to those in the equations listed on p.191 in the Montgomery's textbook? Is the Sigma^2 equal to variance of residuals?

 

As far as I understand SAS can easily compute MSE for random effects. But in case of fixed ones ?



Thank you.

Trusted Advisor
Posts: 1,918

Re: PROC VARCOMP to compute expected mean squares for FIXED effects in 3*3 Factorial design

[ Edited ]

As far as I understand "quadratic form" refers to "squared form" (i.e. a^2)

 

No, a quadratic form is a sum of squares, not a "squared form". As far as I know, there is no "kappa squared" in ANOVA.

 

See if this document is helpful. It specifically covers the case of a two-way ANOVA with fixed effects.

http://www.plantsciences.ucdavis.edu/agr205/Lectures/2011_Transp/T10_MixModels.pdf

Ask a Question
Discussion stats
  • 1 reply
  • 102 views
  • 0 likes
  • 2 in conversation