BookmarkSubscribeRSS Feed
Lao_feng
Obsidian | Level 7

I am doing a logistic regression analysis with random intercept in the model to account for within cluster correlation.There are 3 levels in my data:

Level 1: individual subject

Level 2: Family (some subjects from the same family), the variable is fam_num

Level 3: Village, the variable clu_num

 

The model included country, age, gender, education and marrital status.

 

My codes are:

 

proc glimmix data=work0 NOCLPRINT;
class  country (ref='Pakistan') clu_num  fam_num age4g(ref='40~49') gender edu2g mar2g ;
model comb2g(ref='0')= country age4g gender edu2g mar2g /solution Link=logit dist=binary
random int /sub=clu_num;
random int /sub=fam_num (clu_num) ;
COVTEST GLM;
run;

 

I used 'COVTEST GLM' to check if the outcome is independent or not within clusters. The results I got are as follow:

The P value is 0.4115, suggesting the clustering effects are not statistically significant. In such case, can I remove the random effect from model, and use standard logistic regression? Thanks

 

Covariance Parameter Estimates

Cov Parm

Subject

Estimate

Standard
Error

Intercept

clu_num

0.01724

0.02710

Intercept

fam_n(clu_nu)

0.01920

0.1512

 

Tests of Covariance Parameters
Based on the Residual Pseudo-Likelihood

Label

DF

-2 Res Log P-Like

ChiSq

Pr > ChiSq

Note

Independence

2

10507

0.58

0.4115

MI

2 REPLIES 2
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

In general, I believe that the statistical model should match the design. In your study, individuals are not independent: they are clustered within families which are clustered within villages. Your model does not appear to be having any trouble with estimation. So I would keep the mixed model.

 

Other people may have other opinions.

 

Lao_feng
Obsidian | Level 7

Thank you for your suggestion !

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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