mboost
mboost copied to clipboard
Changing default of off2int...
Shouldn't we perhaps change the default of off2int to TRUE in coef.glmboost() ?
x <- runif(100)
y <- 2 + 2*x + rnorm(100)
m1 <- glmboost(y~x)
## current default is FALSE
coef(m1)
(Intercept) x
-0.8792536 1.7060891
attr(,"offset")
[1] 2.922378
## more user-friendly ?
coef(m1, off2int = TRUE)
(Intercept) x
2.043125 1.706089
In principle, I like the idea. However, the downside is that a lot of code breaks or might break. Hence, I am not sure if we really should do this. Consider someone relying on:
attr(coef(m1), "offset")
[1] 2.922378
## but with new default, we would get
attr(coef(m1, off2int = TRUE), "offset")
NULL
Similar problems might occur if someone wants to add the offset manually.
In essence, I like the idea but would still hesitate to implement it for reasons of downward compatibility.
If you really want to go that way, you should fork mboost, implement the change, make sure that the manuals and all code within mboost (also in the tests) uses the correct version of coef (i.e., with / without off2int) and finally run reverse checks to see if any other package breaks.
Check that off2int is also changed in plot.glmboost()