A small wrapper used by the ineqTrees parsnip engine for
parsnip::decision_tree(). The formula can be either the native
cbind(rank, outcome) ~ predictors response or the usual tidymodels
outcome ~ predictors response when rank_name and outcome_name are
supplied through set_engine().
Usage
ci_tree_parsnip(
formula,
data,
weights = NULL,
rank_name = "wealth",
outcome_name = "deadu5_num",
type = "CIg",
tree_depth = NULL,
minbucket = 100L,
minsplit = 200L,
minprob = 0.01,
maxdepth = 4L,
min_gain = 0,
min_relative_gain = 0,
na.action = stats::na.omit,
...
)Arguments
- formula
A model formula, typically
cbind(rank, outcome) ~ predictors.- data
A data frame containing the variables in
formula.- weights
Optional case weights supplied by parsnip/hardhat.
- rank_name
Name of the socioeconomic rank variable.
- outcome_name
Name of the outcome variable.
- type
One of
"CI","CIg","CIc", or"L".- tree_depth
Optional parsnip tree-depth value.
- minbucket
Minimum weighted child-node size.
- minsplit
Minimum weighted parent-node size.
- minprob
Minimum child-node weight proportion.
- maxdepth
Maximum tree depth. When supplied through
set_engine(), this overridestree_depth.- min_gain
Minimum concentration-index gain required to split.
- min_relative_gain
Minimum concentration-index gain as a share of the parent-node impurity required to split.
- na.action
Function for handling missing values.
- ...
Additional arguments passed to
ci_tree().