In principle this is the right formula (number of observations minus residual df should be the number of parameters fitted), but digging in, it looks like the $df.resid component of the objects hasn't been updated properly:a$n ## 31, correcta$df.resid ## 7, only valid before updating!看着biglm:::update.biglm,我会添加object$df.resid <- object$df.resid + NROW(mm)紧挨着读取的行之前或之后right before or after the line that readsobject$n <- object$n + NROW(mm) ... 对我来说,这似乎是一个相当明显的错误,所以也许我缺少明显的东西,或者它已得到修复.This seems like a fairly obvious bug to me, so perhaps I'm missing something obvious, or perhaps it has been fixed.一个简单的解决方法是将您自己的AIC函数定义为A simple workaround would be to define your own AIC function asAIC.biglm <- function (object, ..., k = 2) { deviance(object) + k * length(coef(object))}AIC(a)-AIC(a2) ## matches results from lm()(尽管请注意,AIC(a_lm)仍不等于AIC(a),因为stats:::AIC.default()使用2 *对数似然而不是偏差(这两个量度的相加系数不同)...)(although note that AIC(a_lm) is still not equal to AIC(a), because stats:::AIC.default() uses 2*log-likelihood rather than deviance (these two measures differ in their additive coefficients) ...) 这篇关于biglm和lm之间的AIC不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 03:32