[英]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. 我正在尝试使用
emmeans
库为gamlss
对象计算估计的边际均值。 My gamlss
object comes from a zero inflated beta regression. 我的
gamlss
对象来自零膨胀的β回归。 Let's say that my model is called m1 and one of my variables is internationaltreaty
, so I call: 假设我的模型叫做m1,我的一个变量是
internationaltreaty
,所以我打电话给:
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. 如果我使用不同的模型对象(例如glm),则emmeans可以使用此代码。 To me it seems like that emmeans doesn't recognize my type argument.
对我而言,似乎emmeans不承认我的类型论点。 Has anyone experienced something similar?
有没有人经历类似的事情?
Thanks. 谢谢。
That error does not come from trying to match your type
argument. 该错误不是来自尝试匹配您的
type
参数。 I can tell this because type = “terms”
is not a possibility in emmeans
. 我可以说这是因为在
emmeans
不能使用type = “terms”
。 So I wonder if you get the same error even without the type
argument. 所以我想知道即使没有
type
参数也会得到相同的错误。
Support for gamlss
objects in emmeans is pretty sketchy, and I think that this is just a model that doesn't work. 在emmeans中支持
gamlss
对象非常粗略,我认为这只是一个不起作用的模型。 You might be able to work around it using the qdrg
function. 您可以使用
qdrg
函数解决它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.