- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How do I set sum of squares in Type III analysis of variance when dealing with a Repeated Measures design, having set the data in "long format" as required by SAS Proc Mixed procedure.
I have am aware that it can be done in Proc GLM but my challenge is when dealing with fixed and random between-subjects factors which require strictly the Proc Mixed procedure. Furthermore, I have come accross and am aware of the fact that (SAS User Guide 2017):
"The 'Type 3 Tests of Fixed Effects' table in Figure 56.7 displays significance tests for the three effects listed in the MODEL statement. The Type 3 F statistics and p-values are the same as those produced by the GLM procedure. However, because PROC MIXED uses a likelihood-based estimation scheme, it does not directly compute or display sums of squares for this analysis."
Example SAS Code:
proc mixed data=LDH_univ method=reml covtest;
class CCI4 CHCI3 Time Flask ;
model Leakage=CCI4 CHCI3 CCI4*CHCI3 Time CCI4*Time CHCI3*Time CCI4*CHCI3*Time;
repeated Time / subject=Flask type=cs;
lsmeans CCI4 / pdiff cl adjust=tukey;
lsmeans CHCI3 / pdiff cl adjust=tukey;
run;
SAS Proc Mixed output:
Is there a way of populating the sum of squares in Proc Mixed without going the Proc GLM route which is not appropriate for random factors?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't think PROC MIXED computes sums of squares, because this is not what PROC MIXED is trying to optimize when fitting the model.
Please see this discussion (particularly the comments from @SteveDenham)
Solved: Proc Mixed - R-Squared - SAS Support Communities
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't think PROC MIXED computes sums of squares, because this is not what PROC MIXED is trying to optimize when fitting the model.
Please see this discussion (particularly the comments from @SteveDenham)
Solved: Proc Mixed - R-Squared - SAS Support Communities
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much. I am following the discussion. I have already started to pick some useful facts from the discussion. I do appreciate your assistance and the team's deliberations. Thank you all
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Check the documentation: Details:Mixed Procedure>Mixed Models Theory>Inference and Test Statistics. How the F statistic is calculated using the matrix formula that doesn't copy well into this box. It is basically this: define param as the vector of fixed effects and random effects, L is a matrix that encodes the estimable linear combinations that constitute the F test, Chat is the estimated variance-covariance matrix, and r is the rank of LChatL' . Then:
F= param'L'inverse((LChatL'))Lparam/r
SteveDenham
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes I got it. Thanks Steve.