tidy_glm | R Documentation |
Runs either a linear regression, logistic regression, or multinomial classification. The model is automatically determined based off the nature of the target variable.
tidy_glm(data, formula)
data |
dataframe |
formula |
formula |
glm model
# linear regression iris %>% tidy_glm( tidy_formula(., target = Petal.Width)) -> glm1 glm1 glm1 %>% visualize_model() # multinomial classification tidy_formula(iris, target = Species) -> species_form iris %>% tidy_glm(species_form) -> glm2 glm2 %>% visualize_model() # logistic regression iris %>% dplyr::filter(Species != "setosa") %>% tidy_glm(species_form) -> glm3 suppressWarnings({ glm3 %>% visualize_model()})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.