BookmarkSubscribeRSS Feed
AVA_16
Obsidian | Level 7

Dear SAS experts,

 

I am using proc glimmix to analyze two-level data. Level-1 patient and level-2 is family. I have 1353 families in total. The minimum number of patients in one family is one and maximum are 49. Most of the families have members from 2 to 4.

 

My research question is:

What is the relationship between patient X variable and the likihood of geting diabetes while controlling for patient and family characteristics?

 

The following datastep shows a part of my data:

 

data have;

input Family_id $ Patient_id T2D X age sex BMI treatment;

datalines;

 

1 2 0 10.6 42.8 0 28.6 0

1 5 0 10.5 59.2 1 29.0 0

1 6 0 6.89 48.0 0 24.2 0

9 7 1 17.3 56.8 1 24.4 0

9 10 1 16.4 68.8 1 26.4 1

11 12 0 17.0 76.0 1 21.2 1

12 13 0 7.5 53.6 1 20.0 0

12 14 1 14.8 71.2 0 23.6 0

12 15 0 10.3 64.8 0 25.0 0

12 16 1 15.6 56.8 0 25.6 1

13 17 0 10.5 59.2 1 29.0 0

15 18 0 6.89 47.2 0 25.2 0

15 20 1 16.3 56.8 1 26.4 1

15 22 1 17.4 57.2 1 26.4 1

15 24 1 15.0 66.0 1 25.2 1

15 25 0 7.5 53.6 1 26.0 0

16 27 0 6.8 71.2 0 23.6 0

16 28 0 6.7 64.8 0 25.0 0

17 29 0 8.89 49.2 0 22.2 0

18 30 1 16.3 66.8 1 23.4 1

19 31 1 15.4 72.2 1 26.4 1

20 32 1 14.9 68.6 0 25.2 0

20 33 0 7.5 53.6 1 26.0 0

20 34 0 6.8 71.2 0 23.6 0

20 35 0 6.7 64.8 0 25.0 0

;

run;

 

I am using the following model to answer my question:

 

**************Proc glimmix fully adjusted model;

proc glimmix data = have method=laplace noclprint;

class family_id sex ;

TITLE 'ROC curve of 1-hour OGTT';

model T2D(event='1') = X age sex BMI treatment /s cl dist=binary link=logit;

random intercept /subject=family_id type=cs solution cl ;

covtest/wald;

output out=glmmout3 pred=xbeta pred(ilink)=predprob pred(ilink

noblup)=fix_predprob;

run;

 

I get the following as a warning:

 

NOTE: The GLIMMIX procedure is modeling the probability that T2D='1'.

WARNING: Obtaining minimum variance quadratic unbiased estimates as starting values for the

covariance parameters failed.

NOTE: The data set WORK.GLMMOUT3 has 25 observations and 11 variables.

 

 

I am not sure what is wrong with the model? Any suggestions are appreciated.

4 REPLIES 4
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Your log says,

 

"NOTE: The data set WORK.GLMMOUT3 has 25 observations and 11 variables."

 

I suspect that your model is overparameterized for only 25 observations and that there are problems with quasi or complete separation.

 

Have you tried the full dataset?

 

 

 

StatsMan
SAS Super FREQ

Also, since you are fitting a g-side random effect for the family_id then you will want to remove TYPE=CS from the RANDOM statement.  If you just want to correlate the observations from the same family on the g-side, then a VC structure will do this.  

 

If you were correlating on the r-side, then you would need TYPE=CS.  

AVA_16
Obsidian | Level 7

Thank you for your response:

 

I ran the model in the full data set. 

 

proc glimmix data = final method=quad noclprint;
class sex (ref='2') treatment (ref='0') ;
model T2D_1(event='1') = X age sex bmi treatment / dist=binary link=logit;
random intercept /subject=Family_id type=vc ;
covtest/wald;
output out=glmmout3 pred=xbeta pred(ilink)=predprob pred(ilink
noblup)=fix_predprob;
run;

 

I get this warning:

 

NOTE: Some observations are not used in the analysis because of: missing fixed effects (n=205).
NOTE: The GLIMMIX procedure is modeling the probability that T2D_1='1'.
WARNING: Obtaining minimum variance quadratic unbiased estimates as starting values for the
covariance parameters failed.
NOTE: The data set WORK.GLMMOUT3 has 3997 observations and 12 variables.

 

When I add parms in the above code as:

 

proc glimmix data = final method=quad noclprint;
class sex (ref='2') treatment (ref='0') ;
model T2D_1(event='1') = X age sex bmi treatment / dist=binary link=logit;
random intercept /subject=Family_id type=vc ;
parms (0.003);
covtest/wald;
output out=glmmout3 pred=xbeta pred(ilink)=predprob pred(ilink
noblup)=fix_predprob;
run;

 

The warning is:

 

OTE: Some observations are not used in the analysis because of: missing fixed effects (n=205).
NOTE: The GLIMMIX procedure is modeling the probability that T2D_1='1'.
NOTE: Convergence criterion (FCONV=2.220446E-16) satisfied.
NOTE: At least one element of the gradient is greater than 1e-3.
NOTE: The data set WORK.GLMMOUT3 has 3997 observations and 12 variables.

 

Based on the above warning I guess, the model is misspecified or a problematic model fitting problem. This is becasue when I try nloptions tech=

 

proc glimmix data = final method=quad noclprint;
class sex (ref='2') treatment (ref='0') ;
model T2D_1(event='1') = X age sex bmi treatment / dist=binary link=logit;
random intercept /subject=Family_id type=vc ;
covtest/wald;
nloptions tech=nrridg;
parms (0.003);
output out=glmmout3 pred=xbeta pred(ilink)=predprob pred(ilink
noblup)=fix_predprob;
run;

 

NOTE: Some observations are not used in the analysis because of: missing fixed effects (n=205).
NOTE: The GLIMMIX procedure is modeling the probability that T2D_1='1'.
ERROR: NRRIDG Optimization cannot be completed.
NOTE: ERROR: The function value of the objective function cannot be computed during the
optimization process.
NOTE: The data set WORK.GLMMOUT3 has 3997 observations and 12 variables.

Any suggestions?

 

Regards,

 

Ava

StatsMan
SAS Super FREQ

Unfortunately, there are a lot of reasons behind the messages you get here.  It could be that the model is too complicated for the data.  If you have a low overall response rate, that could be the reason.  

 

Look at the iteration log.  If the process is steadily marching towards convergence, then perhaps you can tweak some options to get it there.  If the iteration log is bouncing all over the place, then you will need to simplify the model.

 

Try a simple model to start, say with just Gender and the RANDOM statement.  Then add your next most interesting factor if that simple model converges.  In the mixed model world, it's always best to start simple and work up from there.  

 

If a model does not converge, that is not necessarily a bad thing.  The procedure can be telling you that your model with your data are just not compatible.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 1266 views
  • 0 likes
  • 3 in conversation