Usage
NoncompLI(formulae, Z, D, data = parent.frame(), n.draws = 5000,
param = TRUE, in.sample = FALSE, model.c = "probit",
model.o = "probit", model.r = "probit",
tune.c = 0.01, tune.o = 0.01, tune.r = 0.01,
tune.v = 0.01, p.mean.c = 0, p.mean.o = 0,
p.mean.r = 0, p.prec.c = 0.001,
p.prec.o = 0.001, p.prec.r = 0.001,
p.df.o = 10, p.scale.o = 1, p.shape.o = 1,
mda.probit = TRUE, coef.start.c = 0,
coef.start.o = 0, tau.start.o = NULL,
coef.start.r = 0, var.start.o = 1,
burnin = 0, thin = 0, verbose = TRUE)Arguments
formulae
A list of formulae where the first formula specifies the
(pre-treatment) covariates in the outcome model (the latent
compliance covariate will be added automatically), the second
formula specifies the compliance model, and the third formula
Z
A randomized encouragement variable, which should be a binary
variable in the specified data frame.
D
A treatment variable, which should be a binary variable in the
specified data frame.
data
A data frame which contains the variables that appear in
the model formulae (formulae), the encouragement variable
(Z), and the treatment variable (D).
n.draws
The number of MCMC draws. The default is 5000.
param
A logical variable indicating whether the Monte Carlo draws of the
model parameters should be saved in the output object. The default
is TRUE.
in.sample
A logical variable indicating whether or not the sample average
causal effect should be calculated using the observed
potential outcome for each unit. If it is set to FALSE,
then the population average causal effect will be calcul
model.c
The model for compliance. Either logit or probit model
is allowed. The default is probit.
model.o
The model for outcome. The following five models are allowed:
logit, probit, oprobit (ordered probit regression),
gaussian (gaussian regression), negbin (negative
binomial regres
model.r
The model for (non)response. Either logit or probit
model is allowed. The default is probit.
tune.c
Tuning constants for fitting the compliance model. These
positive constants are used to tune the (random-walk)
Metropolis-Hastings algorithm to fit the logit model. Use either a
scalar or a vector of constants whose length equals that of the
tune.o
Tuning constants for fitting the outcome model. These
positive constants are used to tune the (random-walk)
Metropolis-Hastings algorithm to fit logit, ordered
probit, and negative binomial models. Use either a
scalar or a vector of consta
tune.r
Tuning constants for fitting the (non)response model. These
positive constants are used to tune the (random-walk)
Metropolis-Hastings algorithm to fit the logit model. Use either a
scalar or a vector of constants whose length equals that of th
tune.v
A scalar tuning constant for fitting the variance component of the
negative binomial (outcome) model. The default is 0.01.
p.mean.c
Prior mean for the compliance model. It should be either a scalar or
a vector of appropriate length. The default is 0.
p.prec.c
Prior precision for the compliance model. It should be either a
positive scalar or a positive semi-definite matrix of appropriate
size. The default is 0.001.
p.mean.o
Prior mean for the outcome model. It should be either a scalar or
a vector of appropriate length. The default is 0.
p.prec.o
Prior precision for the outcome model. It should be either a
positive scalar or a positive semi-definite matrix of appropriate
size. The default is 0.001.
p.mean.r
Prior mean for the (non)response model. It should be either a scalar or
a vector of appropriate length. The default is 0.
p.prec.r
Prior precision for the (non)response model. It should be either a
positive scalar or a positive semi-definite matrix of appropriate
size. The default is 0.001.
p.df.o
A positive integer. Prior degrees of freedom parameter for the inverse
chisquare distribution in the gaussian and twopart (outcome) models. The
default is 10.
p.scale.o
A positive scalar. Prior scale parameter for the inverse chisquare
distribution (for the variance) in the gaussian and twopart
(outcome) models. For the negative binomial (outcome) model, this is
used for the scale parameter of the inverse gam
p.shape.o
A positive scalar. Prior shape for the inverse chisquare
distribution in the negative binomial (outcome) model. The default
is 1.
mda.probit
A logical variable indicating whether to use marginal data
augmentation for probit models. The default is TRUE.
coef.start.c
Starting values for coefficients of the compliance model.
It should be either a scalar or a vector of appropriate length. The
default is 0.
coef.start.o
Starting values for coefficients of the outcome model.
It should be either a scalar or a vector of appropriate length. The
default is 0.
coef.start.r
Starting values for coefficients of the (non)response model.
It should be either a scalar or a vector of appropriate length. The
default is 0.
tau.start.o
Starting values for thresholds of the ordered probit (outcome) model.
If it is set to NULL, then the starting values will be a
sequence starting from 0 and then incrementing by 0.1. The default
is NULL.
var.start.o
A positive scalar starting value for the variance of the gaussian,
negative binomial, and twopart (outcome) models. The default is
1.
burnin
The number of initial burnins for the Markov chain. The default is
0.
thin
The size of thinning interval for the Markov chain. The default is
0.
verbose
A logical variable indicating whether additional progress reports
should be prited while running the code. The default is
TRUE.