BookmarkSubscribeRSS Feed
keckk
Fluorite | Level 6
Hello all!

In the following code I would like to test whether the random farm effect can be removed from the model, whether the repeatedly measured response = score on the subjects=animals is independent from the farm effect, respectively.
As I understand this can be done in Proc Glimmix by using the covtest statement, which can be specified multiple times.
http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sect...
But it does not work as done below, the procedure does not consider the covtest statement. I am using SAS 9.2.

What's wrong with the syntax? How can I obtain statistical inference on the random farm effect in proc glimmix ?

proc glimmix data=x METHOD=LAPLACE;
class farm genotype animal;
model score = genotype sweek genotype*sweek /
dist=multinomial link=cumlogit solution;
random int / subject=farm solution;
covtest DiagG;
random int sweek / subject=animal solution;
run;

Any help appreciated !
4 REPLIES 4
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12
Check to make sure that the farm effect variance is listed first in the table of variance estimates. If so, then the following will test whether var_farm equals 0:
covtest 0;

If you want to test whether the second variance (using the order determined by SAS) equals 0, use:
covtest . 0;

Test of the first two being simultaneously equal to 0:
covtest 0 0;

And so on.
keckk
Fluorite | Level 6
Thank you. With the code provided the farm variance is listed first in the covariance parameter estimates, if that is what you mean. Nonetheless, the "covtest 0;" statement is not active .
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12
I assume you have 9.2 or 9.22, and that the Log does not give an error (like unknown statement). When you say not active, do you mean that there is no output table generated with the test of the variance? If that is true, you will need to contact SAS Technical Support -- could be a problem with your installation.
keckk
Fluorite | Level 6
Sorry for the confusion with the word "active". Yes, you are right, the log does not give an error and there is no output table for the tests of covariance parameters, though the farm variance is listed first in the output table for covariance parameter estimates.
I use SAS 9.2.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 4 replies
  • 2922 views
  • 0 likes
  • 2 in conversation