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

@holgerbrandl holgerbrandl commented Dec 8, 2017

# 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

This comment has been minimized.

Copy link
Owner

@pbiecek 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

This comment has been minimized.

Copy link
Author

@holgerbrandl holgerbrandl commented Dec 9, 2017

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

@pbiecek pbiecek closed this Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.