instr_linear: Estimate Effect Using Instrument Variables

View source: R/instr_linear.R

instr_linearR Documentation

Estimate Effect Using Instrument Variables

Description

Estimate effect using instrument variables.

Usage

instr_linear(
  data,
  formula,
  exposure.name,
  instrument.name,
  tol = .Machine$double.eps^0.5
)

ividentity.r(
  data,
  formula,
  exposure.name,
  instrument.name,
  tol = .Machine$double.eps^0.5
)

Arguments

data

Dataframe of raw data.

formula

Formula representing the model. It must be a saturated model, e.g. Y ~ T * A.

exposure.name

Name of exposure variable.

instrument.name

Name of instrument variable.

tol

Numeric > 0. Tolerance used in estimation. Default is .Machine$double.eps^0.5.

Details

See section 9.3 p. 167 for details. It is important to note that the formula must specify a saturated model, e.g. Y ~ T * A.

Value

Dataframe in a useable format for rsample::bootstraps.

Source

Section 9.3

Examples

# An example can be found in the location identified in the
# source section above at the github site
# https://github.com/FrankLef/FundamentalsCausalInference.

FrankLef/fciR documentation built on Nov. 12, 2023, 6:09 a.m.