glmmADMB中的新bug? VarCorr找不到rdig

时间:2016-03-03 20:42:40

标签: r mixed-models

我认为这是一个新引入的错误。它至少会破坏以前正在运行的代码。

library(glmmADMB)
epil2$subject <- factor(epil2$subject)
fm <- glmmadmb(y~Base*trt+Age+Visit+(Visit|subject),
            data=epil2, family="nbinom")
VarCorr(fm)

产生以下错误:

Error in glmmADMB::VarCorr(fm) : 
  could not find symbol "rdig" in environment of the generic function
来自VarCorr

nlme仍可正常使用:

library(nlme)
nlme::VarCorr(fm) ##WORKS
glmmADMB::VarCorr(fm) ##Still doesn't work.

如果有帮助,这是我的systemInfo:

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] nlme_3.1-125   glmmADMB_0.8.1 MASS_7.3-45   

loaded via a namespace (and not attached):
 [1] Matrix_1.2-3    plyr_1.8.3      magrittr_1.5    tools_3.2.3    
 [5] coda_0.18-1     Rcpp_0.12.3     stringi_1.0-1   grid_3.2.3     
 [9] stringr_1.0.0   R2admb_0.7.13   lattice_0.20-33

1 个答案:

答案 0 :(得分:4)

我找到了解决问题的方法。我使用了这里提供的安装代码: http://glmmadmb.r-forge.r-project.org/。我不确定是否有必要,但在运行以下代码之前,我导航到我的~R/R-3.2.3/library文件夹并删除了glmmADMB文件夹。

然后我运行了下面的代码。

install.packages("R2admb")
install.packages("glmmADMB", 
    repos=c("http://glmmadmb.r-forge.r-project.org/repos",
            getOption("repos")),
    type="source")

这将我的glmmADMB更新为版本0.8.3.3,更正了错误(将其变为警告)。