Displaying 1 result from an estimated 1 matches for "mod_glm".
2017 May 09
0
Bug simulate.lm() --> needs credential to report it
...ined
elsewhere).
I cannot add the bug in Bugzilla as I have no credential.
Could someone please help me to get credentials so that I can add the bug
in bugzilla?
Thanks a lot,
Simple demonstration for the bug:
set.seed(1L)
y <- 10 + rnorm(n = 100)
mean(y) ## 10.10889
var(y) ## 0.8067621
mod_glm <- glm(y ~ 1, family = gaussian(link = "log"))
new.y <- simulate(mod_glm)[, 1]
mean(new.y) ## 10.10553
var(new.y) ## 0.007243695 ##### WRONG #####
mod_glm$weights <- mod_glm$prior.weights ## ugly hack showing where the
issue is
new.y <- simulate(mod_glm)[, 1]
mean(new.y)...