【发布时间】:2016-07-21 16:03:59
【问题描述】:
Link to data(1170 obs,9 个变量,.Rd 文件)
只需使用readRDS(file) 阅读即可。
我正在尝试使用 MASS 包中的 glmmPQL 函数设置 GLMM,其中包括随机效应部分并考虑空间自相关。但是,R(版本:3.3.1)在执行时崩溃。
library(nlme)
# setup model formula
fo <- hail ~ prec_nov_apr + t_min_nov_apr + srad_nov_apr + age
# setup corSpatial object
correl = corSpatial(value = c(10000, 0.1), form = ~ry + rx, nugget = TRUE,
fixed = FALSE, type = "exponential")
correl = Initialize(correl, data = d)
# fit model
fit5 <- glmmPQL(fo, random = ~1 | date, data = d,
correl = correl, family = binomial)
到目前为止我尝试了什么:
- 减少观察次数
- 使用
corSpatial参数(范围和金块) - 减少固定预测变量的数量
- 在 Windows、Linux (Debian) 和 Mac R 安装上执行代码
虽然我在本地电脑上没有收到错误消息(RStudio 只是崩溃),但在服务器上运行脚本会返回以下错误消息:
R: malloc.c:3540: _int_malloc: Assertion (fwd->size & 0x4) == 0' failed. Aborted
【问题讨论】: