olsmd: Ordinary Least Squares Model Dependence Simulations

Description Usage Arguments Value Examples

View source: R/olsmd.R

Description

Takes in a data set and outputs a data.frame of the estimated average treatment effects.

Usage

1
olsmd(data, dep, treat, predictors, level, n.sims, matched.data = NULL)

Arguments

data

Data set to perform the analysis.

dep

The dependent outcome binary variable that will be used to measure the effect (e.g. "success").

treat

The treatment variable (e.g. "treatment").

predictors

Vector of predictor variables.

level

Level of allowed interactions. Level = (1, 2, 3) and correspond to one-way, two-way and three-way interactions respectively.

n.sims

Number of desired simulated models.

matched.data

Additional data set of pre-processed data to compare the same random models on both data sets.

Value

Returns a data.frame composed by the list of estimated treatment effects and the model used in each iteration. In the case of including an additional data set, the data.frame will have to columns with the respective estimates.

Examples

1
2
3
4
5
6
## Not run: 
data(lalonde)
p <- c("treat", "age", "black", "hisp", "re75", "married", "educ")

olsmd(lalonde, "re78", "treat", predictors=p level=2, method="odds")
## End(Not run)

pampakid/amor documentation built on Nov. 7, 2019, 3:15 p.m.