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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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