Learn R Programming

DesignLibrary (version 2.0.0)

binary_iv_designer: Create a binary instrumental variables design

Description

Routes to make_design() with id "binary_iv": make_design("binary_iv", N = N, type_probs = type_probs, ...).

Usage

binary_iv_designer(
  N = 100,
  type_probs = c(1/3, 1/3, 1/3, 0),
  assignment_probs = c(0.5, 0.5, 0.5, 0.5),
  a_Y = 1,
  b_Y = 0,
  d_Y = 0,
  outcome_sd = 1,
  a = c(1, 0, 0, 0) * a_Y,
  b = rep(b_Y, 4),
  d = rep(d_Y, 4),
  args_to_fix = NULL
)

Value

A design object.

Arguments

N

Sample size.

type_probs

Shares of always-takers, never-takers, compliers, and defiers.

assignment_probs

Probability that Z = 1 for each type.

a_Y

Outcome intercept for always-takers, used in the default a.

b_Y

Effect of X on the outcome for every type, used in the default b.

d_Y

Direct effect of Z on the outcome for every type, used in the default d.

outcome_sd

Standard deviation of the outcome shock.

a, b, d

Length-4 outcome intercepts, effects of X, and direct effects of Z, by type.

args_to_fix

Ignored. Present for compatibility with DesignLibrary 0.1.

Details

Units are always-takers, never-takers, compliers, or defiers, in that order in every length-4 argument. a_Y, b_Y, and d_Y fill the defaults of a, b, and d and are not passed on. Argument names match DesignLibrary 0.1's binary_iv_designer. See also make_design("encouragement") and make_design("instrumental_variables").

See Also

make_design()

Examples

Run this code
binary_iv_designer(N = 200, b_Y = 0.5)
binary_iv_designer(type_probs = c(0.2, 0.2, 0.5, 0.1), b = c(0, 0, 1, -1))

Run the code above in your browser using DataLab