r - update on merMod object gives different fit -
i trying refit full model of class mermod
intercept (the null model). however, refitting using update.mermod
gives different answer fitting null model hand, e.g.:
# generate random data set.seed(9) dat <- data.frame( x = do.call(c, lapply(1:5, function(x) rnorm(100, x))), random = letters[1:5] ) dat$y = rnbinom(500, mu = exp(dat$x), size = 1) library(lme4) # full model full <- glmer.nb(y ~ x + (1 | random), dat) # write out intercept-only model hand null <- glmer.nb(y ~ 1 + (1 | random), dat) # update null2 <- update(full, . ~ 1 -. + (1 | random)) varcorr(null) varcorr(null2)
any idea why how can use update
same vcov matrix?
Comments
Post a Comment