0

I am using zeroinfl test with my data, and was wondering if it is enough to mention the z value in a paper.

Otherwise, I used the lrtest to calculate the X² and p values as follows:

model1<-zeroinfl(y~X1+X2,dist="negbin") model2>-zeroinfl(y~X1,dist="negbin")

lrtest(model1,model2) Likelihood ratio test

Model 1: y~ x1+ x2 Model 2: y~ x1 #Df LogLik Df Chisq Pr(>Chisq)
1 9 -301.04
2 7 -315.60 -2 29.124 4.741e-07 ***

So, I dont understand where the DF comes from!!

Thank you for your advice.

Ismail
  • 1
  • The degrees of freedom associated with the log likelihood values are for testing the null hypothesis of a saturated model. This should have $n-p_M$ degrees of freedom ($n$ is # of obs) and ($p_M$ is # of parameters. When excluding $x_2$, we are using 2 less parameters since by default each covariate is used to model the mean function as well as the zero-probability function. The LRT will have DF equal to the difference of the degrees of freedom from the saturated tests (i.e. $9-7=2$). It appears you should enter the more complex argument as the first argument since it is giving $-2$. – user277126 Feb 13 '22 at 07:37
  • Thanks for your explanation. – Ismail Feb 13 '22 at 11:21
  • x1 has two levels, x2 has three levels and there are 35 values of the tested parameter. So, I dont know how the df from the tests (9, 7) are computed!! Do you think z value from summary is enough in a paper ? – Ismail Feb 13 '22 at 11:36

0 Answers0