Dear fellows,
I am using Proc Glimmix with a longitudinal data in which the event is observed at week 0, 48 and 96.
I am using a logistic regression and I would like to test whether the random effect is significant as the sas output show only the parameter estimate and its respective standard . Is it done with COVTEST?
The Syntax used is:
proc glimmix data=t6 method=quad;
class pid1;
model GONOR= /dist=bin link=logit s;
random int / subject=pid1 type=ar(1);
RUN;
Yes. Try adding:
COVTEST zerog;
This should give a likelihood ratio test whether the random effect can be set to zero, However, the selection of options for COVTEST really will depend on how you set up the RANDOM statement. With a repeated factor, you may be fitting this a G side effect or an R side effect. The test options will change based on this.
SteveDenham
Luri,
Yes you can use the COVTEST statement in PROC GLIMMIX. For example,
proc glimmix data=t6 method=quad;
class pid1;
model GONOR= /dist=bin link=logit s;
random int / subject=pid1 ;
covtest zerog;
RUN;
BTW, type=ar(1) is not necessary for random intercept models.
Hope this helps,
Jill
In answer to your question yes the COVTEST statement allows you to make statistical inferences concerning the covariance parameters. It fits a reduced model based on the specification in the COVTEST statement and compares it with the full model based on the MODEL and RANDOM statements. The comparison is done using a likelihood ratio test. If a pseudo-likelihood estimation method is used in PROC GLIMMIX, the models are made comparable by basing the likelihoods on the final pseudo-data for the full model. The GLIMMIX documentation includes information on syntax and examples for using the COVTEST statement for additional examples you may refer to the following SAS Usage Note.
It you want to estimate a random intercept and/or random coefficients model. The typical covariance structures are TYPE=UN or TYPE=VC. The TYPE=AR(1) works well for the R-side random effects , but does not make much sense for random coefficients models.
For your repeated measures on each subject, I am going to assume that the variable name for that is time. So here is a G-side repeated measures code. Note that it does not fit subject as a random effect, since I used the Cholesky parameterized unstructured covariance structure.
proc glimmix data=t6 method=quad;
class pid1 time;
model GONOR=time /dist=bin link=logit s;
random time/ subject=pid1 type=chol;
covtest zerog;
covtest diagg;
RUN;
The diagg option for the second COVTEST is for the off-diagonal entries (the 3 covariances between the 3 timepoints). If that is not significant, you could reduce the covariance matrix to UN(1). Of course, if the zerog is not significant then you can remove all random effects.
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.