split: sample splitting function

View source: R/split.R

splitR Documentation

sample splitting function

Description

sample splitting function

Usage

split(data, vars, outcome, treat, minsize, alpha)

Arguments

data

list of predictor, treatment assignment and outcome variables

vars

names of the predictors as character vector.

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

list containing (split = splitting information, subset = logical vector indicating left + right observations, data = observations used in split, var = variable that was split)


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