简体   繁体   English

R:Glmer模型错误

[英]R: Glmer Model Error

By run of follow code in R: 通过在R中运行遵循代码:

m3 <- glmer(accoccur ~ Time + Year + Month  + holiday + HolidayNum  + (1 + Time | DistfKaraj) , data = accident, family = "binomial" , nAGQ =1)

Run stooped with this error: 运行时出现以下错误:

Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) : 
  "anyNA" is not a BUILTIN function

anyNA() is a function that was introduced in R 3.1.0 -- search http://cran.r-project.org/src/base/NEWS for the function name. anyNA()是R 3.1.0中引入的函数-在http://cran.r-project.org/src/base/NEWS中搜索函数名称。 My guess is that you have the development version of lme4 (hosted here ), which makes use of anyNA() (based on the blame , it was added in November 2014), but doesn't define it for you. 我的猜测是,您拥有lme4的开发版本(在此处托管),该版本使用anyNA() (基于blame ,它于2014年11月添加),但并未为您定义。

You have a few options: 您有几种选择:

  1. Upgrade to at least R 3.1.0 -- current is 3.2.0. 至少升级到R 3.1.0-当前为3.2.0。
  2. Define anyNA() yourself, with anyNA <- function(x) any(is.na(x)) 自己定义anyNA() ,其中anyNA <- function(x) any(is.na(x))

I'd recommend at least upgrading your version of R, unless you rely on packages that are unavailable in future versions. 我建议至少升级您的R版本,除非您依赖于将来版本中不可用的软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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