cost_function: Causal Tree cost function

View source: R/cost_function.R

cost_functionR Documentation

Causal Tree cost function

Description

Causal Tree cost function

Usage

cost_function(splits, outcome, treat, minsize, alpha)

Arguments

splits

logical subsetting vector for observations to use.

outcome

name of the outcome variable as character vector.

treat

name of the treatment indicator variable as character vector (treatment indicator must be binary numeric 1 == treatment, 0 == control with no NA).

minsize

minimum number of treatment and control observations that must be present in each split as numeric vector.

alpha

weighting of cost function numeric vector between 0-1. weights closer to 1 put more emphasis on maximizing heterogeneity. weights closer to 0 put more weight on precisely estimating treatment effects.

Value

numeric vector with split cost


till-tietz/rcf documentation built on May 7, 2023, 10:23 p.m.