BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ngwali
Calcite | Level 5

When I run the following code, I get a warning message as follows:

 

"WARNING: The number of response pairs for estimating correlation is less

than or equal to the number of regression parameters. A simpler

correlation model might be more appropriate.

WARNING: The generalized Hessian matrix is not positive definite.

Iteration will be terminated."

 

NB: The program is executed normally till the end, convergence was attained, but when I tried different covariance options in the "type = AR(1)" or UN, or CS, etc., all estimates and standard errors are thesame for different covariance structures that i used.  I wanted to look for the covariance structure that produces the smallest QIC value. Unfortunatell for me, all covariance structures used gave same empirical estimates and standard errors. 

 

Also when I specify the CORRW in the repeated statement, the working correlation matrix is same for all structures of covariance verified. i.e diagonals are ones and others zeros.

 

Please I need your help, especially in the warning message above, and to have varying results for different covariance options used.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

From this, I assume that timeclss has 12 levels, and that they are equally spaced.  For an unstructured working covariance matrix, that means 66 parameters to estimate in the covariance matrix, plus all of the fixed effect parameters.  For binary data, the folks at R-sig-ME recommend at least 10 "effective observations" per parameter, so my hunch is that after dichotomizing, you end up with a lot of blank cells, such that the repeated parts aren't being easily fit.

 

Have you considered PROC GEE or GLIMMIX as alternatives?  I only say that because I am a lot more familiar with the errors from those procs...

 

Steve Denham

View solution in original post

8 REPLIES 8
Reeza
Super User

You should probably include your code and log for us to be able to help. We don't even know what proc you're running. 

 

I'll also move this to the Statistical Procedures Forum.

 

ngwali
Calcite | Level 5
Hello Reeza, the code was included in my inquiries, I guess you didnt read the message correctly

Please go via my question again, and you will find the code within the body of the text. Rem. Yresp is a binary response
Reeza
Super User

@ngwali wrote:
Hello Reeza, the code was included in my inquiries, I guess you didnt read the message correctly

Please go via my question again, and you will find the code within the body of the text. Rem. Yresp is a binary response

There's an error message in your initial question, but no code. There is code in your latest message. 

ngwali
Calcite | Level 5
Hello Reeza and Rick_SAS:

Please see my code below. There is no difference in the parameter estimates and their standard errors. NB; for Type=ind, the error message is not observed. But for other working assumptions, i get the error message and the estiomates and s.e remains thesame:

Warning message: The number of response pairs for estimating correlation is less than or equal to the number
of regression parameters. A simpler correlation model might be more appropriate.


*CS working correlation;
proc genmod data=final descending;
class id visit gender cardio reject timeclss;
model yresp=age gender cardio reject time age*time
gender*time cardio*time reject*time /dist=binomial link=logit type3;
repeated subject=id/withinsubject=timeclss type=CS corrw ;
run;quit;

*UN working correlation;
proc genmod data=final descending;
class id visit gender cardio reject timeclss;
model yresp=age gender cardio reject time age*time
gender*time cardio*time reject*time /dist=bin type3;
repeated subject=id/withinsubject=timeclss type=UN covb corrw;
run;quit;


*AR working correlation;
proc genmod data=final1 descending;
class id visit gender cardio reject timeclss;
model yresp=age gender cardio reject time age*time
gender*time cardio*time reject*time /dist=binomial link=logit type3 offset=offset;
repeated subject=id/withinsubject=visit type=AR(1) corrw ;
run;quit;

*Independent working assumptions;
proc genmod data=final descending;
class id visit gender cardio reject timeclss;
model yresp=age gender cardio reject time age*time
gender*time cardio*time reject*time /dist=binomial link=logit type3;
repeated subject=id/ within=timeclss type=ind covb corrw modelse;
run;quit;
Reeza
Super User

I think Ricks correct and as the message indicates, you don't have enough observations for the estimates you're trying to derive. You need to simplify your model or increase the number of observations.

Rick_SAS
SAS Super FREQ

It sounds like you don't have enough observations to fit the covariance structure.   For example, if you have K subjects and are trying to fit an unstructured covariance model, there are K(K-1)/2 covariance parameters to be fit (plus any fixed effects). If you don't have sufficiently many observations, the model cannot be fit.. 

ngwali
Calcite | Level 5
total number of obs i.e id =1160 subjects
#of time points =12.
#with type=ind, no warining message is seen.
But with any other covariance structure i see the warning message I recently posted.
SO if you say number of obs is the problem, then I dont think it is. There is no issue, as i have first of all used a contnuous verious of the response variable, and now, i dichotomized it into binary response, and then the prblem starts poping up

SteveDenham
Jade | Level 19

From this, I assume that timeclss has 12 levels, and that they are equally spaced.  For an unstructured working covariance matrix, that means 66 parameters to estimate in the covariance matrix, plus all of the fixed effect parameters.  For binary data, the folks at R-sig-ME recommend at least 10 "effective observations" per parameter, so my hunch is that after dichotomizing, you end up with a lot of blank cells, such that the repeated parts aren't being easily fit.

 

Have you considered PROC GEE or GLIMMIX as alternatives?  I only say that because I am a lot more familiar with the errors from those procs...

 

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 8 replies
  • 3567 views
  • 2 likes
  • 4 in conversation