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

Formula notation in plug_formula #15

Open
cimentadaj opened this issue Jul 4, 2020 · 0 comments
Open

Formula notation in plug_formula #15

cimentadaj opened this issue Jul 4, 2020 · 0 comments

Comments

@cimentadaj
Copy link
Owner

Trying to adapt plug_formula to accept notation such as multilevel groupings of survival notation. Starting out with multilevel but can't fit it:

library(tidyflow)
library(multilevelmod)
#> Loading required package: parsnip
data(sleepstudy, package = "lme4")
mixed_model_spec <- linear_reg() %>% set_engine("lmer")
tflow <-
  sleepstudy %>%
  tidyflow() %>%
  plug_formula(Reaction ~ Days + (Days | Subject)) %>%
  plug_model(mixed_model_spec)

res <- fit(tflow)
#> Warning in Ops.factor(Days, Subject): '|' not meaningful for factors
#> Error in if (remove_intercept) {: argument is of length zero

This is related to hardhat::mold not handling well multilevel notation. See issue tidymodels/hardhat#147

Next step would be to try models with cbind and Surv.

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

1 participant