ivEstimate: Obtaining IV-like specifications

Description Usage Arguments Value Examples

View source: R/ivlike.R

Description

This function estimates the IV-like estimands, as well as generates the weights associated with the IV-like specifications.

Usage

1
2
3
4
5
6
7
8
9
ivEstimate(
  formula,
  data,
  subset,
  components,
  treat,
  list = FALSE,
  order = NULL
)

Arguments

formula

formula to be estimated using OLS/IV.

data

data.frame with which to perform the estimation.

subset

subset condition with which to perform the estimate.

components

vector of variable names whose coefficients we want to include in the set of IV-like estimands.

treat

name of treatment indicator variable.

list

logical, set to TRUE if this function is being used to loop over a list of formulas.

order

integer, default set to NULL. This is simply an index of which IV-like specification the estimate corresponds to.

Value

Returns a list containing the matrices of IV-like specifications for D = 0 and D = 1; and the estimates of the IV-like estimands.

Examples

1
2
3
4
5
6
dtm <- ivmte:::gendistMosquito()
ivEstimate(formula = ey ~ d | z,
           data = dtm,
           components = l(d),
           treat = d,
           list = FALSE)

ivmte documentation built on Sept. 17, 2021, 5:06 p.m.