BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Antoine37
Calcite | Level 5

How do I show the degrees of freedom for random components of a mixed model in proc mixed?

Is there a way to show them in the table of the output of the covariance parameter estimates? Does anyone know????

Thanks a lot

 

Antoine

 

Here is my syntax:

 

proc mixed data = work.import method=reml;
class ID A B C D E;
model outcome = A B C D A*B /s ddfm = kr;
random intercept A B E  / subject = ID v = 1;

run;
repeated / subject = ID r = 1;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

There are no degrees of freedom for an estimated variance or covariance based on likelihood (restricted likelihood) analysis. That's the short answer. It can be more complicated (for different purposes). An estimated variance asymptotically has a normal distribution (i.e., a t distribution with infinite df). But asymptotic results kick in here only for VERY large sample size. It is rare that one can rely on large-sample theory to use the normal approximation (although you can request this with a COVTEST statement in GLIMMIX). One can also test an estimated variance based on a likelihood ratio test. This still relies on asymptotic theory, but simulations generally show that one can use this approach at much smaller and more reasonable sample sizes. If you have one variance term (in addition to a residual), you can use:

COVTEST 0;

to test for the equality of the variance to 0. The df nominally is 1 for this (basically 1 for the numerator df and infinity for the denominator df), and a chi-squared test statistic (with 1 df) is used. However, for certain common situations, other work shows that the test statistic is more complicated than that, being a mixture of two chi-squared distributions (with 1 df and 0 df for the two components). The COVTEST statement figures this out automatically.

 

Anyway, I go back to the start of the message. I would not report any df for your estimated variances.

View solution in original post

2 REPLIES 2
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

There are no degrees of freedom for an estimated variance or covariance based on likelihood (restricted likelihood) analysis. That's the short answer. It can be more complicated (for different purposes). An estimated variance asymptotically has a normal distribution (i.e., a t distribution with infinite df). But asymptotic results kick in here only for VERY large sample size. It is rare that one can rely on large-sample theory to use the normal approximation (although you can request this with a COVTEST statement in GLIMMIX). One can also test an estimated variance based on a likelihood ratio test. This still relies on asymptotic theory, but simulations generally show that one can use this approach at much smaller and more reasonable sample sizes. If you have one variance term (in addition to a residual), you can use:

COVTEST 0;

to test for the equality of the variance to 0. The df nominally is 1 for this (basically 1 for the numerator df and infinity for the denominator df), and a chi-squared test statistic (with 1 df) is used. However, for certain common situations, other work shows that the test statistic is more complicated than that, being a mixture of two chi-squared distributions (with 1 df and 0 df for the two components). The COVTEST statement figures this out automatically.

 

Anyway, I go back to the start of the message. I would not report any df for your estimated variances.

Antoine37
Calcite | Level 5

Thank you very much for your support in helping me. I think your answer is very clear !

Regards

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 1374 views
  • 1 like
  • 2 in conversation