Displaying 1 result from an estimated 1 matches for "mod_glm1".
Did you mean:
mod_glm
2017 May 02
0
potential bug in simulate.lm when gaussian(link != "identity")
...he variance is divided by
the model weights (precisely, not the prior ones), which is not documented.
Can somebody file this bug for me (if you agree that this is a bug)?
Many thanks.
Alex
Simple demonstration:
set.seed(1L)
y <- 10 + rnorm(n = 100)
mean(y) ## 10.10889
var(y) ## 0.8067621
mod_glm1 <- glm(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 ##### WR...