turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Student with SAS problems

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 02:49 PM

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.

Accepted Solutions

Solution

12-01-2016
02:20 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-01-2016 09:01 AM

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

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 03:19 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 05:46 PM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 06:40 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 05:58 PM

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;

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 06:41 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 03:49 PM

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..

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-28-2016 05:44 PM

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

#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

Solution

12-01-2016
02:20 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-01-2016 09:01 AM

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