Displaying 1 result from an estimated 1 matches for "mod_glm3".
Did you mean:
mod_glm
2017 May 02
0
potential bug in simulate.lm when gaussian(link != "identity")
...(y ~ 1, family = gaussian())
new.y1 <- simulate(mod_glm1)[, 1]
mean(new.y1) ## 10.07493
var(new.y1) ## 0.7402303
mod_glm2 <- glm(y ~ 1, family = gaussian(link = "log"))
new.y2 <- simulate(mod_glm2)[, 1]
mean(new.y2) ## 10.11152
var(new.y2) ## 0.008445062 ##### WRONG #####
mod_glm3 <- mod_glm2
mod_glm3$weights <- NULL
new.y3 <- simulate(mod_glm3)[, 1]
mean(new.y3) ## 10.15524
var(new.y3) ## 0.7933856 ##### OK(?) #####
### my session ###
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin16.5.0 (64-bit)
Running under: macOS Sierra 10.12...