Why does R update function changes glmer fit when called with 1 argument?
问题 Below is a simplified code reproducing what looks to me like a problem with R update function: library('lme4') f <- function(formula) { data <- data.frame(a = c(4, 5), rowi = c(1, 2), b = c(2, 2)) fit0 <- glmer(formula, data = data, family = poisson(log)) fit1 <- update(fit0) cat('f likelihoods: ', logLik(fit0), logLik(fit1), '\n') } g <- function() { f(a ~ -1 + (1|rowi) + offset(b)) data <- data.frame(a = c(4, 5), rowi = c(1, 2), b = c(20, 40)) f(a ~ -1 + (1|rowi) + offset(b)) cat('g