Programming the statistical procedures from SAS

covtest statement (proc glimmix)

Reply
Contributor
Posts: 51

covtest statement (proc glimmix)

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 !
Valued Guide
Valued Guide
Posts: 684

Re: covtest statement (proc glimmix)

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.
Contributor
Posts: 51

Re: covtest statement (proc glimmix)

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 .
Valued Guide
Valued Guide
Posts: 684

Re: covtest statement (proc glimmix)

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.
Contributor
Posts: 51

Re: covtest statement (proc glimmix)

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.
Ask a Question
Discussion stats
  • 4 replies
  • 823 views
  • 0 likes
  • 2 in conversation