when I run heterogeneous variance model using proc glimmix to test homogeneity of variance assumption I get this
DATA a;
input id 1 batch 1 ref 5-7 new 9-11;
diff=new-ref;
datalines;
1 116 119
2 115 121
3 103 121
4 135 130
5 108 116
6 113 122
7 115 117
8 127 124
;
keep batch ref new diff;
*wide-format data to long-format data;
DATA b;
SET a;
ARRAY trials[2] ref new;
DO TIME = 1 TO 2;
y = trials[TIME];
trial = TIME-1;
OUTPUT; *wihtout this time=3 values overwrite all;
END;
KEEP batch y trial;
proc print data=c (OBS=12) NOOBS; run;
*run glm;
PROC GLIMMIX data=b plots=residualpanel;
CLASS trial (ref=first);
MODEL y=trial /solution ddfm=KR;
random _residual_ /group=trial type=VC;
covtest /wald;
LSMEANS trial /alpha=0.05 cl diff plot=diffplot;
run;
Cov Parm | Group | Estimate | Standard Error | Z Value | Pr > Z |
Residual (VC) | trial 1 | 19.3571 | 10.3468 | 1.87 | 0.0307 |
Residual (VC) | trial 0 | 103.43 | 55.2849 | 1.87 | 0.0307 |
my question is: why z and p values for variance components are fixed to be equal to each other? is this some sort of model constraints? If the sample do not pass the homogeneity variance test so I end up keeping heterogenous variance in the model, can i use and interpret these p-values? Thanks!
Best,
Tom
The fixed effect t values and p values certainly should be fine. I have some hesitation about the Wald chi-square and p values for the random effects with only 8 subjects, as these are asymptotically correct as the sample size approaches infinity, and while 8 is a large number for tests about fixed effects, it certainly is not for tests about variance components.
SteveDenham
Hi @Tomchoi ,
I can't reproduce what you have, given your set-up code (The GLIMMIX part looks OK for now). When I run everything down to the PROC PRINT, the dataset WORK.b is missing the y variable for all instances of Trial 0. Could you double check what is going on? Once we have values for Trial 0, then we can see what GLIMMIX is up to.
SteveDenham
Thanks, @Tomchoi .
I have poked and prodded at this, and it seems that no matter how I reparameterize, the Wald tests come out the same. All I can guess is that the denominators (asymptotic standard errors) are wholly dependent on the estimate, so that algebraically you get the same ratio, and thus the same Z value.
SteveDenham
The fixed effect t values and p values certainly should be fine. I have some hesitation about the Wald chi-square and p values for the random effects with only 8 subjects, as these are asymptotically correct as the sample size approaches infinity, and while 8 is a large number for tests about fixed effects, it certainly is not for tests about variance components.
SteveDenham
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.