Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing default of off2int... #55

Open
mayrandy opened this issue Sep 27, 2016 · 3 comments
Open

Changing default of off2int... #55

mayrandy opened this issue Sep 27, 2016 · 3 comments
Assignees

Comments

@mayrandy
Copy link
Member

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 
@hofnerb
Copy link
Member

hofnerb commented Sep 28, 2016

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.

@hofnerb
Copy link
Member

hofnerb commented Sep 28, 2016

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.

@mayrandy mayrandy self-assigned this Oct 4, 2016
mayrandy added a commit to mayrandy/mboost that referenced this issue Oct 4, 2016
@hofnerb
Copy link
Member

hofnerb commented Jan 16, 2017

Check that off2int is also changed in plot.glmboost()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants