This model targets the compatible complier probabilistic index model.

ivpim(
  y,
  z,
  a,
  X = NULL,
  ps_model,
  link = "logit",
  init = NULL,
  tol = sqrt(.Machine$double.eps),
  max.iter = 100,
  nleqslv.global = "none",
  trace = FALSE,
  test.nleqslv = FALSE,
  keep.data = FALSE
)

Arguments

y

numeric Outcome vector.

z

numeric Binary instrument, e.g., randomized treatment assignment.

a

numeric Actual received treatment, must be the same length as z.

X

numeric Covariates.

ps_model

glm First step propensity score glm() object.

link

character Link function: "logit", or "probit".

init

numeric Initial guess of Newton's method.

tol

numeric Numeric tolerance of nleqslv().

max.iter

numeric Maximum iteration of Newton's method.

nleqslv.global

character The global strategy for Newton's method. See ?nleqslv::nleqslv.

trace

logical Show Newton's method iteration report if TRUE.

test.nleqslv

logical Test different global strategies for Newton's method if TRUE. See ?nleqslv::testnslv.

keep.data

logical Should the returned object keep original data?

Value

A list containing the estimated coefficients and their covaraince matrix. It also contains the diagnostics of nleqlsv() procedure. If keep.data is TRUE, then the inputs y, z, a, X, link, w

will also be returned.