formula_lfe: Stitches together formula for use in felm

View source: R/formulaMakers.R

formula_lfeR Documentation

Stitches together formula for use in felm

Description

Stitches together formula for use in felm

Usage

formula_lfe(y, X, W = NULL, D = NULL, Z = NULL, C = NULL)

Arguments

y

The dependent variable

X

vector of controls

W

treatment variable

D

vector of factor variables to be partialed out

Z

vector of instruments

C

vector of variables cluster standard errors (multi-way permitted by LFE)

Examples

formula_lfe(y = 'mpg', X = c('hp', 'drat'), D = c('wt', 'vs'))
formula_lfe(y = 'mpg', X = c('hp', 'drat'), W = 'gear', Z = c('cyl', 'carb'), D = c('wt', 'vs'), C = c('cyl', 'wt'))

apoorvalal/LalRUtils documentation built on Sept. 22, 2023, 5:53 p.m.