Skip to contents

A small wrapper used by the ineqTrees parsnip engine for parsnip::rand_forest().

Usage

ci_forest_parsnip(
  formula,
  data,
  weights = NULL,
  rank_name = "wealth",
  outcome_name = "deadu5_num",
  type = "CIg",
  ntree = 500L,
  mtry = NULL,
  minbucket = 100L,
  minsplit = 200L,
  minprob = 0.01,
  maxdepth = 4L,
  min_gain = 0,
  min_relative_gain = 0,
  perturb = list(replace = FALSE, fraction = 0.632),
  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".

ntree

Number of trees to grow.

mtry

Optional number of variables tried at each split.

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 overrides tree_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.

perturb

Resampling specification passed to ci_forest().

na.action

Function for handling missing values.

...

Additional arguments passed to ci_tree().

Value

A fitted ci_forest object.