Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Genmod ZINB model - WARNING: Negative of Hessian not positive definite...

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 10-06-2019 06:30 PM
(3203 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Please show us the output.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Source | DF | Chi-Square | Pr > ChiSq |

a | 5 | 4184.93 | <.0001 |

b | 1 | 3.38 | 0.0662 |

c | 1 | 833.46 | <.0001 |

d | 1 | . | . |

e | 1 | 1303.81 | <.0001 |

f | 1 | . | . |

g | 1 | 1156.32 | <.0001 |

h | 1 | 110.49 | <.0001 |

i | 1 | 35.01 | <.0001 |

j | 4 | . | . |

k | 2 | 284.19 | <.0001 |

l | 3 | 577.5 | <.0001 |

m | 1 | . | . |

n | 1 | . | . |

o | 1 | 592.15 | <.0001 |

p | 1 | 521.37 | <.0001 |

q | 1 | 1572.42 | <.0001 |

r | 1 | 877.94 | <.0001 |

LR Statistics For Type 3 Analysis of Zero | |||

Inflation Model | |||

Source | DF | Chi-Square | Pr > ChiSq |

a | 5 | 105.13 | <.0001 |

b | 1 | 57.31 | <.0001 |

c | 1 | 101.84 | <.0001 |

d | 1 | 8.43 | 0.0037 |

e | 1 | 47.75 | <.0001 |

g | 1 | 2.99 | 0.0839 |

h | 1 | 0.19 | 0.6623 |

i | 1 | 1.5 | 0.2212 |

j | 4 | 295.27 | <.0001 |

k | 2 | . | . |

l | 3 | . | . |

m | 1 | . | . |

n | 1 | 15.08 | 0.0001 |

o | 1 | 15.55 | <.0001 |

p | 1 | 0.09 | 0.7666 |

q | 1 | 27.7 | <.0001 |

r | 1 | 15.6 | <.0001 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Please show your PROC GENMOD statements.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.