BookmarkSubscribeRSS Feed
Gilles-Protais
Obsidian | Level 7

Please which code can i use to test for random effects (random intercepts and random slopes) using a mixture of chi sqaures

Thanks

2 REPLIES 2
Ksharp
Super User

I am not sure if the following CHISQ option is what you are looking for ?

 

proc mixed data=sashelp.heart(obs=100) ;
class bp_status sex;
model weight=height sex/s chisq;
random int sex/subject=bp_status  ;
run;

or @SteveDenham  @lvm  knew it. 

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I think you are asking about testing Ho: Variance = 0 vs Ha: Variance >0. When you use the COVTEST statement in GLIMMIX, the procedure automatically uses a mixture of chi-square statistics when appropriate (and it tells you in the results).  The mixture is typically needed when the variance parameter is on the boundary (e.g., 0). 

See 

https://support.sas.com/kb/40/724.html

to learn about COVTEST (this is different than the covtest option in MIXED).  The online documentation for GLIMMIX will explain COVTEST in more details, with simpler examples. This is a likelihood ratio test, where the ratio is compared with the chi-square statistic (mixture or otherwise, depending on the situation).  This is explained also in:

chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/177-2007.pdf

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 875 views
  • 8 likes
  • 3 in conversation