instr_logistic: Estimate Effect Using Instrument Variables via Logistic Fit

View source: R/instr_logistic.R

instr_logisticR Documentation

Estimate Effect Using Instrument Variables via Logistic Fit

Description

Estimate effect using instrument variables via logistic fit.

Usage

instr_logistic(
  data,
  formula,
  exposure.name,
  instrument.name,
  tol = .Machine$double.eps^0.5,
  niter = 10L
)

ivlogit.r(
  data,
  formula,
  exposure.name,
  instrument.name,
  tol = .Machine$double.eps^0.5,
  niter = 10L
)

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.

niter

Number of iterations

Details

See section 9.3 p. 167-168 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.