![](/img/trans.png)
[英]Generating predictive simulations from a multilevel model with random intercepts
[英]ggcoef_model error when two random intercepts
當試圖用 GGally 中的兩個隨機截距GGally
glmmTMB
模型的條件固定效應時,我得到了錯誤:
調用“tidy_fun()”時出錯。 這很可能是因為“tidy_fun=”中提供的函數拼寫錯誤、不存在、與您的對象不兼容或缺少必要的參數(例如“conf.level=”或“conf.int=”)。 請參閱下面的錯誤消息。 錯誤:“stop_vctrs()”中的錯誤:! 無法回收“..1”(尺寸 3)以匹配“..2”(尺寸 2)。`
我已經解決了這個問題,它似乎與模型中包含的兩個隨機截距有關。 我還嘗試通過broom.mixed::tidy
分別提取系數和標准誤差信息,然后將數據框輸入GGally:ggcoef()
無濟於事。 有什么建議么?
# Example with built-in randu data set
data(randu)
randu$A <- factor(rep(c(1,2), 200))
randu$B <- factor(rep(c(1,2,3,4), 100))
# Model
test <- glmmTMB(y ~ x + z + (0 +x|A) + (1|B), family="gaussian", data=randu)
# A few of my attempts at graphing--works fine when only one random effects term is in model
ggcoef_model(test)
ggcoef_model(test, tidy_fun = broom.mixed::tidy)
ggcoef_model(test, tidy_fun = broom.mixed::tidy, conf.int = T, intercept=F)
ggcoef_model(test, tidy_fun = broom.mixed::tidy(test, effects="fixed", component = "cond", conf.int = TRUE))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.