Dear all! ? ? ? ? ? ? ? ? ? I have a question that needs help!? In a zero-inflated model,? two explanatory variables are included to the count data, through the zeroinfl function, and the lrtest, I want to know the significance of each variable, but I don???t know how can I do this. the full mode is m1<-zeroinfl (count~A*B|A*B, dist="negbin", link="logit", data=mydata) How can I set another model that using the lrtest I can get the Chi-square, df, and P value of factor A ? There is an example in the book (Mixed effects models and extensions in ecology with R), but I can't get the results in P284 (Like Year (X2 = 12.553, df = 2, p = 0.002), Area (X2 = 47.599, df = 3, p< 0.001))? . Can anyone help me? Thanks very much and best wishes! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Sincerely zhangshuang ? ? ? [[alternative HTML version deleted]]
You need to dig into the zeroinfl code and figure out how to set the parameter k to a fixed value. In fact...the code uses log(k)....where k is the parameter in the variance term of the NB. Set the k of the submodels to the k of the full model. Then calculate the likelihood values of the submodels and apply the likelihood ratio test. The drop1 function for a NB GLM does this all automatically...but for zeroinfl you have to do it manually. A detailed example plus all R code is given in: Zero Inflated Models and Generalized Linear Mixed Models with R. Zuur, Saveliev, Ieno. (2012). It comes out in 2 weeks and can be ordered from http://www.highstat.com/book4.htm Alain
Dr. Alain F. Zuur First author of: 1. Analysing Ecological Data (2007). Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p. URL: www.springer.com/0-387-45967-7 2. Mixed effects models and extensions in ecology with R. (2009). Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer. http://www.springer.com/life+sci/ecology/book/978-0-387-87457-9 3. A Beginner's Guide to R (2009). Zuur, AF, Ieno, EN, Meesters, EHWG. Springer http://www.springer.com/statistics/computational/book/978-0-387-93836-3 Other books: http://www.highstat.com/books.htm Statistical consultancy, courses, data analysis and software Highland Statistics Ltd. 6 Laverock road UK - AB41 6FN Newburgh Tel: 0044 1358 788177 Email: highstat at highstat.com URL: www.highstat.com URL: www.brodgar.com