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

support for interaction terms #7

Closed
holgerbrandl opened this issue Dec 8, 2017 · 2 comments
Closed

support for interaction terms #7

holgerbrandl opened this issue Dec 8, 2017 · 2 comments

Comments

@holgerbrandl
Copy link

# works
lmModel = lm(len ~ supp+dose, data = ToothGrowth)

# does not work but would be great
lmModel = lm(len ~ supp*dose, data = ToothGrowth)
broken(lmModel, ToothGrowth[1,])
pbiecek added a commit that referenced this issue Dec 8, 2017
@pbiecek
Copy link
Owner

pbiecek commented Dec 8, 2017

thanks, interactions are handled now

model <- lm(Sepal.Length~Petal.Width*Species, data=iris)
new_observation <- iris[1,]
br <- broken(model, new_observation)
plot(br)

unfortunately, support for other terms is more difficult
right now this will not work:

model <- lm(Sepal.Length~log(Petal.Width), data=iris)

pbiecek added a commit that referenced this issue Dec 8, 2017
@holgerbrandl
Copy link
Author

Awesome, thanks a lot for the patch and the library itself.

@pbiecek pbiecek closed this as completed Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants