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

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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