turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- PROC VARCOMP to compute expected mean squares for ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

3 weeks ago

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:

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to stan

3 weeks ago - last edited 3 weeks ago

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