Programming the statistical procedures from SAS

Student with SAS problems

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Student with SAS problems

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
Respected Advisor
Posts: 2,655

Re: Student with SAS problems

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


All Replies
Grand Advisor
Posts: 16,931

Re: Student with SAS problems

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.

 

New Contributor
Posts: 4

Re: Student with SAS problems

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
Grand Advisor
Posts: 16,931

Re: Student with SAS problems


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. 

New Contributor
Posts: 4

Re: Student with SAS problems

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;
Grand Advisor
Posts: 16,931

Re: Student with SAS problems

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.

SAS Super FREQ
Posts: 3,319

Re: Student with SAS problems

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

New Contributor
Posts: 4

Re: Student with SAS problems

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

Solution
‎12-01-2016 02:20 PM
Respected Advisor
Posts: 2,655

Re: Student with SAS problems

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 165 views
  • 2 likes
  • 4 in conversation