WARNING: Negative of Hessian not positive definite (PROC GENMOD)

Reply
Contributor
Posts: 34

WARNING: Negative of Hessian not positive definite (PROC GENMOD)

Hello,

I am running analysis on a sample (N=160) with a count outcome which is the number of ICD-10 items reported by participants (0 minimum, 6 maximum). Here is the SAS program: 

 

data negbig;
set work.wp;
if W1_Cat_FINAL_NODUAL=1;
run;

 

proc genmod data=negbig;
class W1_Sex (param=ref ref=last) W1_SD3 (param=ref ref=first) W1_F13 (param=ref ref=first)
W1_F17 (param=ref ref=first) W1_F18 (param=ref ref=first)
W1_SCTS_6R (param=ref ref=first) W1_SCTS_8R (param=ref ref=first)
W1_SCTS_17R (param=ref ref=first) W1_SCTS_20R (param=ref ref=first)
W1_SCTS_27R (param=ref ref=first);
model W1_ICD10_Numberofcriteria = W1_Sex W1_SD3 W1_F13 W1_F17 W1_F18 W1_DISTR_SCORE
W1_NOVEL_SCORE W1_SCTS_6R W1_SCTS_8R W1_SCTS_17R W1_SCTS_20R W1_SCTS_27R
/type3 dist=poisson link=log dscale;
run;


proc reg data=negbig;
model W1_ICD10_Numberofcriteria = W1_Sex W1_SD3 W1_F13 W1_F17 W1_F18 W1_DISTR_SCORE
W1_NOVEL_SCORE W1_SCTS_6R W1_SCTS_8R W1_SCTS_17R W1_SCTS_20R W1_SCTS_27R/ vif tol;
run;


data test1;
pval = 1 - probchi(111.1172, 143);
run;
proc print data=test1;run;


proc genmod data=negbig descending;
class W1_ID W1_Sex (param=ref ref=last) W1_SD3 (param=ref ref=first) W1_SD11_A (param=ref ref=first) W1_F13 (param=ref ref=first) W1_WP32_A (param=ref ref=first)
W1_SM56_B (param=ref ref=first) W1_SM56_C (param=ref ref=first) W1_SCTS_18R (param=ref ref=first) W1_SCTS_20R (param=ref ref=first)
W1_SCTS_21R (param=ref ref=first);
model W1_ICD10_Numberofcriteria = W1_Sex W1_SD3 W1_SD11_A W1_F13 W1_WP32_A W1_SM56_B W1_SM56_C W1_DEPRESSION_SCORE W1_SCTS_18R
W1_SCTS_20R W1_SCTS_21R/type3 dist=poisson link=log;
Repeated subject=W1_ID / type=Ind;
run;

 

 

No collinearity among explanatory variables. However, I encountered the follwoing error:

 

                                   WARNING: Negative of Hessian not positive definite

 

 

What this means and how can I overcome this problem?

Thank you.

 

Super User
Posts: 19,814

Re: WARNING: Negative of Hessian not positive definite (PROC GENMOD)

Posted in reply to sas_user4
How many variables do you have in your model? A categorical variable with N levels counts as N-1 variables. I'm thinking you have more variables than data...
Ask a Question
Discussion stats
  • 1 reply
  • 1079 views
  • 0 likes
  • 2 in conversation