简体   繁体   中英

emmeans error: Error in match.arg(type) : 'arg' should be one of “link”, “response”, “terms”

I'm trying to calculate estimated marginal means with the emmeans library for a gamlss object. My gamlss object comes from a zero inflated beta regression. Let's say that my model is called m1 and one of my variables is internationaltreaty , so I call:

emmeans(m1,"internationaltreaty",type="response")

and I get the following error message:

Error in match.arg(type) : 
  'arg' should be one of “link”, “response”, “terms”

If I use a different model object (for example glm), emmeans works with this code. To me it seems like that emmeans doesn't recognize my type argument. Has anyone experienced something similar?

Thanks.

That error does not come from trying to match your type argument. I can tell this because type = “terms” is not a possibility in emmeans . So I wonder if you get the same error even without the type argument.

Support for gamlss objects in emmeans is pretty sketchy, and I think that this is just a model that doesn't work. You might be able to work around it using the qdrg function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM