BookmarkSubscribeRSS Feed
telligent
Quartz | Level 8

Can I ignore this warning? If not, any suggestions on what to check. 

 

I get this error message with a ZINB model but not with a ZIP model with the same terms.

 

 

14 REPLIES 14
PaigeMiller
Diamond | Level 26

A search of the Internet for "negative of hessian not positive definite" returns a number of discussions on this issue.

--
Paige Miller
Ksharp
Super User

@Rick_SAS  wrote a blog about it . In general, your model is not specified correctly or your initial value is not good.

PaigeMiller
Diamond | Level 26

@Ksharp wrote:

@Rick_SAS  wrote a blog about it . In general, your model is not specified correctly or your initial value is not good.


In addition, I think there are other causes, such as the model is overspecified, or not enough data, and probably a few others.

--
Paige Miller
telligent
Quartz | Level 8

There was one variable in my zinb model that came out with a missing Wald Chi-Square.  I reran with that variable removed and the error went away, but I have still have missing Chi-Square values in my Type 3 table.  Is this also a sign of misspecification?

PaigeMiller
Diamond | Level 26

Please show us the output.

--
Paige Miller
telligent
Quartz | Level 8

I dropped variable F from my zero model and the warning went away, but my type 3 tables look like this:

LR Statistics For Type 3 Analysis
SourceDFChi-SquarePr > ChiSq
a54184.93<.0001
b13.380.0662
c1833.46<.0001
d1..
e11303.81<.0001
f1..
g11156.32<.0001
h 1110.49<.0001
i135.01<.0001
j4..
k2284.19<.0001
l3577.5<.0001
m1..
n1..
o1592.15<.0001
p1521.37<.0001
q11572.42<.0001
r1877.94<.0001
    
LR Statistics For Type 3 Analysis of Zero
Inflation Model
SourceDFChi-SquarePr > ChiSq
a5105.13<.0001
b157.31<.0001
c1101.84<.0001
d18.430.0037
e147.75<.0001
g12.990.0839
h 10.190.6623
i11.50.2212
j4295.27<.0001
k2..
l3..
m1..
n115.080.0001
o115.55<.0001
p10.090.7666
q127.7<.0001
r115.6<.0001
 
PaigeMiller
Diamond | Level 26

Please read message 3 in this thread: https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-wi...

 

Although that discussion was about logistic regression, the concept applies to all modeling in SAS with a CLASS variable(s).

 

In addition, you probably can't estimate all of the factors in your model, as they are not independent of one another, if you know an estimate of one coefficient, you can determine the estimate of other coefficients.

--
Paige Miller
telligent
Quartz | Level 8

But these aren’t levels of a categorical variable, they are each separate categorical variables.  This isn’t a parameter estimates table like in the link, it is a type 3 table. 

 

Would the lack of independence show up in VIF/TOL type statistics?

 

PaigeMiller
Diamond | Level 26

Suppose you have temperature (Celsius) and temperature (Fahrenheit) and temperature (Kelvin) as three variables, and you want to put them all in the model. These are not independent, these are completely dependent, if you know one, you know the others exactly, and after putting one of these in the model, there's no additional information to be gained by putting the others in the model. That's the situation you are in, that is why some of the variables cannot be estimated by your model.

--
Paige Miller
telligent
Quartz | Level 8

I would think that would show up as high correlation or high VIF, but I don't see any correlations above .25 and all VIFs are below 2.  Also why does this show up in the ZINB model but not the ZIP model?

PaigeMiller
Diamond | Level 26

This can also happen if one variable is a linear combination of other variables. Such as

 

x4 = 0.25*x1 - 2.75*x2 + 61*x3

 

and if this is the case, you still can't estimate the effect of x4, even though the correlation might not indicate a problem. Or it may be something specific to ZINB, but I don't know enough about ZINB to be sure.

--
Paige Miller
Rick_SAS
SAS Super FREQ

Please show your PROC GENMOD statements.

telligent
Quartz | Level 8

proc genmod data = temp

class bene_id     a b c d

e f g h i j

k l m n o p q r;

model &outcome. = a b c d

e f g h i j

k l m n o p q r / dist = zinb link = log offset=logofsomething type3;

zeromodel a b c d

e f g h i j

k l m n o p q r;

run;

 

removing f from the zeromodel removes the error but leaves me with blanks in my type 3 table.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 14 replies
  • 4329 views
  • 1 like
  • 4 in conversation