Will remove terms where var_type == "intercept".
Usage
tidy_remove_intercept(x, model = tidy_get_model(x))Details
If the variable column is not yet available in x,
tidy_identify_variables() will be automatically applied.
See also
Other tidy_helpers:
tidy_add_coefficients_type(),
tidy_add_contrasts(),
tidy_add_estimate_to_reference_rows(),
tidy_add_header_rows(),
tidy_add_n(),
tidy_add_pairwise_contrasts(),
tidy_add_reference_rows(),
tidy_add_term_labels(),
tidy_add_variable_labels(),
tidy_attach_model(),
tidy_disambiguate_terms(),
tidy_group_by(),
tidy_identify_variables(),
tidy_plus_plus(),
tidy_select_variables()
Examples
df <- Titanic |>
  dplyr::as_tibble() |>
  dplyr::mutate(Survived = factor(Survived))
glm(Survived ~ Class + Age + Sex, data = df, weights = df$n, family = binomial) |>
  tidy_and_attach() |>
  tidy_remove_intercept()
#> # A tibble: 5 × 11
#>   term      variable var_class var_type var_nlevels estimate std.error statistic
#>   <chr>     <chr>    <chr>     <chr>          <int>    <dbl>     <dbl>     <dbl>
#> 1 Class2nd  Class    character categor…           4   -1.02      0.196     -5.19
#> 2 Class3rd  Class    character categor…           4   -1.78      0.172    -10.4 
#> 3 ClassCrew Class    character categor…           4   -0.858     0.157     -5.45
#> 4 AgeChild  Age      character dichoto…           2    1.06      0.244      4.35
#> 5 SexMale   Sex      character dichoto…           2   -2.42      0.140    -17.2 
#> # ℹ 3 more variables: p.value <dbl>, conf.low <dbl>, conf.high <dbl>