Internals Safely Make Workflow for GEE Linear Regression
Source:R/internals-make-wflw-gee-lin-reg.R
internal_make_wflw_gee_lin_reg.Rd
Safely Make a workflow from a model spec tibble.
Arguments
- .model_tbl
The model table that is generated from a function like
fast_regression_parsnip_spec_tbl()
, must have a class of "tidyaml_mod_spec_tbl".- .rec_obj
The recipe object that is going to be used to make the workflow object.
Details
Create a model specification tibble that has a workflows::workflow()
list column.
See also
Other Internals:
internal_make_fitted_wflw()
,
internal_make_spec_tbl()
,
internal_make_wflw()
,
internal_make_wflw_predictions()
,
internal_set_args_to_tune()
,
make_classification_base_tbl()
,
make_regression_base_tbl()
Examples
library(dplyr)
library(recipes)
library(multilevelmod)
mod_tbl <- make_regression_base_tbl()
mod_tbl <- mod_tbl |>
filter(
.parsnip_engine %in% c("gee") &
.parsnip_fns == "linear_reg"
)
class(mod_tbl) <- c("tidyaml_mod_spec_tbl", class(mod_tbl))
mod_spec_tbl <- internal_make_spec_tbl(mod_tbl)
rec_obj <- recipe(mpg ~ ., data = mtcars)
internal_make_wflw_gee_lin_reg(mod_spec_tbl, rec_obj)
#> [[1]]
#> ══ Workflow ════════════════════════════════════════════════════════════════════
#> Preprocessor: Variables
#> Model: linear_reg()
#>
#> ── Preprocessor ────────────────────────────────────────────────────────────────
#> Outcomes: outcome_var
#> Predictors: predictor_vars
#>
#> ── Model ───────────────────────────────────────────────────────────────────────
#> Linear Regression Model Specification (regression)
#>
#> Computational engine: gee
#>
#>