Description Usage Arguments Details Value Slots References Examples
Regression analysis for sensitive survey questions using a list experiment and direct question.
1 2 3 4 5 6 7 8 9 10 | listExperiment(formula, data, treatment, J, direct = NULL,
sensitive.response = NULL, outcome = NULL, outcome.trials = NULL,
outcome.model = "logistic", outcome.constrained = TRUE,
control.constraint = "none", misreport.treatment = TRUE, weights = NULL,
se = TRUE, tolerance = 1e-08, max.iter = 10000, n.runs = 3,
verbose = TRUE, get.data = FALSE, par.control = NULL,
par.sensitive = NULL, par.misreport = NULL, par.outcome = NULL,
par.outcome.aux = NULL, formula.control = NULL,
formula.sensitive = NULL, formula.misreport = NULL,
formula.outcome = NULL, get.boot = 0, ...)
|
formula |
An object of class " |
data |
A data frame containing the variables to be used in the model. |
treatment |
A string indicating the name of the treatment indicator in the data. This variable must be coded as a binary, where 1 indicates assignment to treatment and 0 indicates assignment to control. |
J |
An integer indicating the number of control items in the list experiment. |
direct |
A string indicating the name of the direct question response in the data. The direct question must be coded as a binary variable. If NULL (default), a misreport sub-model is not fit. |
sensitive.response |
A value 0 or 1 indicating whether the response that is considered sensitive in the list experiment/direct question is 0 or 1. |
outcome |
A string indicating the variable name in the data to use as the outcome in an outcome sub-model. If NULL (default), no outcome sub-model is fit. [experimental] |
outcome.trials |
An integer indicating the number of trials in a binomial/betabinomial model if both an outcome sub-model is used and if the argument |
outcome.model |
A string indicating the model type to fit for the outcome sub-model ("logistic", "binomial", "betabinomial"). [experimental] |
outcome.constrained |
A logical value indicating whether to constrain U* = 0 in the outcome sub-model. Defaults to TRUE. [experimental] |
control.constraint |
A string indicating the constraint to place on Z* and U* in the control-items sub-model:
|
misreport.treatment |
A logical value indicating whether to include a parameter for the treatment indicator in the misreport sub-model. Defaults to TRUE. |
weights |
A string indicating the variable name of survey weights in the data (note: standard errors are not currently output when survey weights are used). |
se |
A logical value indicating whether to calculate standard errors. Defaults to TRUE. |
tolerance |
The desired accuracy for EM convergence. The EM loop breaks after the change in the log-likelihood is less than the value of |
max.iter |
The maximum number of iterations for the EM algorithm. Defaults to 10000. |
n.runs |
The total number of times that the EM algorithm is run (can potentially help avoid local maxima). Defaults to 1. |
verbose |
A logical value indicating whether to print information during model fitting. Defaults to TRUE. |
get.data |
For internal use. Used by wrapper function |
par.control |
A vector of starting parameters for the control-items sub-model. Must be in the order of the parameters in the resulting regression output. If NULL (default), randomly generated starting points are used, drawn from uniform(-2, 2). |
par.sensitive |
A vector of starting parameters for the sensitive-item sub-model. Must be in the order of the parameters in the resulting regression output. If NULL (default), randomly generated starting points are used, drawn from uniform(-2, 2). |
par.misreport |
A vector of starting parameters for the misreport sub-model. Must be in the order of the parameters in the resulting regression output. If NULL (default), randomly generated starting points are used, drawn from uniform(-2, 2). |
par.outcome |
A vector of starting parameters for the outcome sub-model. Must be in the order of the parameters in the resulting regression output. If NULL (default), randomly generated starting points are used, drawn from uniform(-2, 2). [experimental] |
par.outcome.aux |
A vector of starting parameters for the outcome sub-model in which |
formula.control |
An object of class " |
formula.sensitive |
An object of class " |
formula.misreport |
An object of class " |
formula.outcome |
An object of class " |
get.boot |
For internal use. An integer, which if greater than 0 requests that |
... |
Additional options. |
The listExperiment function allows researchers to fit a model
for a list experiment and direct question simultaneously, as
described in Eady (2017). The primary aim of the function is
to allow researchers to model the probability that respondents
provides one response to the sensitive item in a list experiment
but respond otherwise when asked about the same sensitive item on a
direct question. When a direct question response is excluded from
the function, the model is functionally equivalent to that proposed
by Imai (2011), as implemented as the ictreg function
in the list package (https://CRAN.R-project.org/package=list).
listExperiment returns an object of class "listExperiment".
A summary of this object is given using the summary.listExperiment
function. All components in the "listExperiment" class are listed below.
par.controlA named vector of coefficients from the control-items sub-model.
par.sensitiveA named vector of coefficients from the sensitive-item sub-model.
par.misreportA named vector of coefficients from the misreport sub-model.
par.outcomeA named vector of coefficients from the outcome sub-model.
par.outcome.auxA named vector of (auxiliary) coefficients from the outcome sub-model (if outcome.model = "betabinomial").
dfDegrees of freedom.
se.sensitiveStandard errors for parameters in the sensitive-item sub-model.
se.controlStandard errors for parameters in the control-items sub-model.
se.misreportStandard errors for parameters in the misreport sub-model.
se.outcomeStandard errors for parameters in the outcome sub-model.
se.outcome.auxStandard errors for the auxiliary parameters in the outcome sub-model (if outcome.model = "betabinomial").
vcov.mleVariance-covariance matrix.
wThe matrix of posterior predicted probabilities for each observation in the data used for model fitting.
dataThe data frame used for model fitting.
directThe string indicating the variable name of the direct question.
treatmentThe string indicating the variable name of the treatment indicator.
model.misreportA logical value indicating whether a misreport sub-model was fit.
outcome.modelThe type of model used as the outcome sub-model.
outcome.constrainedA logical value indicating whether the parameter U* was constrained to 0 in the outcome sub-model.
control.constraintA string indicating the constraints placed on the parameters Z* and U* in the control-items sub-model.
misreport.treatmentA logical value indicating whether a treatment indicator was included in the misreport sub-model.
weightsA string indicating the variable name of the survey weights.
formulaThe model formula.
formula.controlThe model specification of the control-items sub-model.
formula.sensitiveThe model specification of the sensitive-item sub-model.
formula.misreportThe model specification of the misreport sub-model.
formula.outcomeThe model specification of the outcome sub-model.
sensitive.responseThe value 0 or 1 indicating the response to the list experiment/direct question that is considered sensitive.
xlevelsThe factor levels of the variables used in the model.
llikThe model log-likelihood.
nThe sample size of the data used for model fitting (this value excludes rows removed through listwise deletion).
JThe number of control items in the list experiment.
seA logical value indicating whether standard errors were calculated.
runsThe parameter estimates from each run of the EM algorithm (note: the parameters that result in the highest log-likelihood are used as the model solution).
callThe method call.
bootA logical value indicating whether non-parametric bootstrapping was used to calculate model parameters and standard errors.
Eady, Gregory. 2017 "The Statistical Analysis of Misreporting on Sensitive Survey Questions."
Imai, Kosuke. 2011. "Multivariate Regression Analysis for the Item Count Technique." Journal of the American Statistical Association 106 (494): 407-416.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ## EXAMPLE 1: Simulated list experiment and direct question
n <- 10000
J <- 4
# Covariates
x <- cbind(intercept = rep(1, n), continuous1 = rnorm(n),
continuous2 = rnorm(n), binary1 = rbinom(n, 1, 0.5))
treatment <- rbinom(n, 1, 0.5)
# Simulate Z*
param_sensitive <- c(0.25, -0.25, 0.5, 0.25)
prob_sensitive <- plogis(x %*% param_sensitive)
true_belief <- rbinom(n, 1, prob = prob_sensitive)
# Simulate whether respondent misreports (U*)
param_misreport <- c(-0.25, 0.25, -0.5, 0.5)
prob_misreport <- plogis(x %*% param_misreport) * true_belief
misreport <- rbinom(n, 1, prob = prob_misreport)
# Simulate control items Y*
param_control <- c(0.25, 0.25, -0.25, 0.25, U = -0.5, Z = 0.25)
prob.control <- plogis(cbind(x, misreport, true_belief) %*% param_control)
control_items <- rbinom(n, J, prob.control)
# List experiment and direct question responses
direct <- true_belief
direct[misreport == 1] <- 0
y <- control_items + true_belief * treatment
A <- data.frame(y, direct, treatment,
continuous1 = x[, "continuous1"],
continuous2 = x[, "continuous2"],
binary1 = x[, "binary1"])
## Not run:
model.sim <- listExperiment(y ~ continuous1 + continuous2 + binary1,
data = A, treatment = "treatment", direct = "direct",
J = 4, control.constraint = "none",
sensitive.response = 1)
summary(model.sim, digits = 3)
## End(Not run)
## EXAMPLE 2: Data from Eady (2017)
data(gender)
## Not run:
# Note: substantial computation time
model.gender <- listExperiment(y ~ gender + ageGroup + education +
motherTongue + region + selfPlacement,
data = gender, J = 4,
treatment = "treatment", direct = "direct",
control.constraint = "none",
sensitive.response = 0,
misreport.treatment = TRUE)
summary(model.gender)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.