BookmarkSubscribeRSS Feed
knighsson
Obsidian | Level 7

Hello,

 

I run a logistic regression, the code is below. 


proc surveylogistic data=nh.ob_diet1836 nomcar;
class t240 age RIAGENDR PIR SDDSRVYR RIDRETH1/ param=glm;
strata SDMVSTRA;
cluster SDMVPSU;
weight glucwt4yr;
domain eligible;
model BMI_outcome= age RIAGENDR PIR SDDSRVYR EIEER RIDRETH1 t240/ vadjust=none df=none link=glogit;
lsmeans t240/ cl oddsratio adjust =tukey;
run;

 

after running this code, the results automatically have information of AIC:1.PNG but I think it is too large, so I used PROC mixed to test.

 

code is below:
proc mixed data=nh.ob_diet1836 covtest noclprint;
CLASS t240 age RIAGENDR PIR SDDSRVYR RIDRETH1;
WEIGHT glucwt4yr;
model BMI_outcome= age RIAGENDR PIR SDDSRVYR EIEER RIDRETH1 t240;
random intercept;
run;

 

and AIC results is:

2.PNG

 

The difference between two AIC is huge. I wonder which one is right or how can I get the accurate results.

 

One thing I want to mention is that when I run PROC MIXED, the log showed that

" 18634 observations are not included because of missing values.
NOTE: Convergence criteria met but final Hessian is not positive definite.
NOTE: Estimated G matrix is not positive definite." and those did not show when I run PROC SURVEYLOGISTIC statement.

 

Thank you for helping me!

2 REPLIES 2
Rick_SAS
SAS Super FREQ

1. You are not fitting the same model. For one thing, you are fitting a logistic (or cumulative logistic) model with SURVEYSELECT and a linear model in PROC MIXED. 

2. The documentation for these procedures provides the log-likelihood for each of these procedures. The LL for SURVEYLOGISTIC is not the same as the LL for PROC MIXED.

knighsson
Obsidian | Level 7

Thank you so much for your response, I carefully read those two tutorials, but I have a follow- up question. So In my "proc surveylogistic procedure", I have two domains, one is "eligible=1" (1836 participants), one is "eligible=2" (n=18634 participants), but the after I running the  code, the results showed that the two AICs in the two domains are the same (based on my understanding the two AICs should be different) and way too large (I think AIC can be very large, but the results showed above are too large). So I wonder what went wrong and how can I test the results?

 

Thank you!

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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