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?
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
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
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
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
Yes I got it. Thanks Steve.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.