简体   繁体   English

emmeans错误:match.arg(type)中的错误:'arg'应该是“link”,“response”,“terms”之一

[英]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.

相关问题 无法在整洁文本中使用NRC词典。 match.arg(lexicon)中的错误:“ arg”应为“ afinn”,“ bing”,“ loughran”之一 - Unable to use NRC lexicon in tidytext. Error in match.arg(lexicon) : 'arg' should be one of “afinn”, “bing”, “loughran” 对多个 arguments 使用 match.arg 时出错 - Error in using match.arg for multiple arguments Rigraph degree()'match.arg中的错误' - R igraph degree() 'Error in match.arg' 警告:match.arg中的错误:'arg'必须为NULL或字符向量 - Warning: Error in match.arg: 'arg' must be NULL or a character vector match.arg(mvnTest)中的错误:“ arg”的长度必须为1 - Error in match.arg(mvnTest) : 'arg' must be of length 1 match.arg(regions) 中的错误:“arg”必须为 NULL 或字符向量 - Error in match.arg(regions) : 'arg' must be NULL or a character vector 运行应用程序时出现闪亮错误:match.arg(position) 中的错误:'arg' 必须为 NULL 或字符向量 - Shiny Error when running App: Error in match.arg(position) : 'arg' must be NULL or a character vector match.arg(opt_crit)中的错误:“ arg”必须为NULL或字符向量 - Error in match.arg(opt_crit) : 'arg' must be NULL or a character vector Shiny 应用程序中的“match.arg(position) 错误:‘arg’必须为 NULL 或字符向量” - "Error in match.arg(position) : 'arg' must be NULL or a character vector" in Shiny app match.arg(p.adjust.method)中的错误:“ arg”必须为NULL或字符向量 - Error in match.arg(p.adjust.method) : 'arg' must be NULL or a character vector
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM