subset_sample: Subset to analystic sample

Description Usage Arguments Value

View source: R/subset_sample.R

Description

Subset to analystic sample

Usage

1
2
3
4
5
6
7
subset_sample(
  DT,
  subset_vars,
  progress = F,
  balance_vars = NULL,
  inst = "first_mo"
)

Arguments

DT

a data.table

subset_vars

variables to subset

progress

logical, if TRUE prints where in subsetting process the function is

balance_vars

string character, if non-NULL, then estimates balance

inst

chatacter, name of instrument to check balance on

Value

a list with three elements

DT_subset

Subsetted data.table

obs

data.table with observations at each subsetting step

dt_bal

data.table with first stage on balance variables at each subset


evanjflack/cfo.behavioral documentation built on Oct. 10, 2020, 11:52 p.m.