我正在尝试ffdf
使用bigglm.ffdf
ffbase 运行逻辑回归模型,但出现错误:
x1 = as.ff(sample(0:5, 400, replace=T))
x2 = as.ff(sample(c(rep(0, 98), rep(1, 2)), 400, replace=T) )
df2 = ffdf(x1, x2)
mod = bigglm.ffdf(x2 ~ x1, family = binomial(), data = df2)
> Error in R[ok, ok] <- chol2inv(R[ok, ok, drop = FALSE]) :
number of items to replace is not a multiple of replacement length
关于代码有什么问题的任何见解?提前谢谢了。
编辑: ram 对象按预期运行:
x5 = sample( 0:5, 400, replace=T)
x6 = sample(c(rep(0, 98), rep(1, 2)), 400, replace=T)
df3 = data.frame(x5, x6)
mod = glm(x6 ~ x5, family = binomial(), data = df3)
# no error