mlmd: Maximum Likelihood Model Dependence Simulations

Description Usage Arguments Value Examples

View source: R/mlmd.R

Description

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

Usage

1
2
mlmd(data, dep, treat, predictors, level, n.sims, method = "odds",
  matched.data = NULL)

Arguments

data

A binary dependent data set.

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.

method

Format method to present results. The default is set to predictions of log-odds ="odds". For results on the scale of the predictors ="coeffs".

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: 
peacekeeping <- read.table("peacekeeping.csv")
p <- c("untype4", "wartype", "logcost", "wardur", "factnum", "trnsfcap", "decade")

mlmd(peacekeeping, "pbs2s3", "untype4", predictors=p level=2, method="odds")
## End(Not run)

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