0
$\begingroup$

I have created a zero-altered negative binomial model (ZNAB, using the hurdle function in R). This model consists of two parts, one which analysis zero values, and the other analysing positive values between variables. Now, I assume I would have to continue with two posthoc tests to find differences between categories of a variable. I'm not sure how to do this, as the lsmeans function considers and outputs averages, I think. How would you analyze these two model compartments separately?

$\endgroup$
  • $\begingroup$ Could you please provide an example model with a description of what kind of post-hoc test you want to perform? I guess that you can do this based on waldtest() (lmtest), linearHypothesis() (car), or glht() (multcomp), depending on which test exactly you want to perform. $\endgroup$ – Achim Zeileis Jan 27 '18 at 23:38
1
$\begingroup$

There are several options possible using the mode argument. See the vignette on models — https://cran.r-project.org/web/packages/emmeans/vignettes/models.html — for details (note that emmeans is the continuation of lsmeans).

Specifically, mode = “count” and mode = “zero” are used to get the separate parts of the model, and mode = “response” is used to obtain the estimated means.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.