Set up a Two-Stage Binary Outcome Misclassification jags.model
Object for a Given Prior
jags_picker_2stage.Rd
Set up a Two-Stage Binary Outcome Misclassification jags.model
Object for a Given Prior
Usage
jags_picker_2stage(
prior,
sample_size,
dim_x,
dim_z,
dim_v,
n_cat,
Ystar,
Ytilde,
X,
Z,
V,
beta_prior_parameters,
gamma_prior_parameters,
delta_prior_parameters,
number_MCMC_chains,
model_file,
display_progress = TRUE
)
Arguments
- prior
A character string specifying the prior distribution for the \(\beta\), \(\gamma\), and \(\delta\) parameters. Options are
"t"
,"uniform"
,"normal"
, or"dexp"
(double Exponential, or Weibull).- sample_size
An integer value specifying the number of observations in the sample.
- dim_x
An integer specifying the number of columns of the design matrix of the true outcome mechanism,
X
.- dim_z
An integer specifying the number of columns of the design matrix of the first-stage observation mechanism,
Z
.- dim_v
An integer specifying the number of columns of the design matrix of the second-stage observation mechanism,
V
.- n_cat
An integer specifying the number of categorical values that the true outcome,
Y
, and the observed outcomes, \(Y^*\) and \(\tilde{Y}\), can take.- Ystar
A numeric vector of indicator variables (1, 2) for the first-stage observed outcome
Y*
. The reference category is 2.- Ytilde
A numeric vector of indicator variables (1, 2) for the second-stage observed outcome \(\tilde{Y}\). The reference category is 2.
- X
A numeric design matrix for the true outcome mechanism.
- Z
A numeric design matrix for the first-stage observation mechanism.
- V
A numeric design matrix for the second-stage observation mechanism.
- beta_prior_parameters
A numeric list of prior distribution parameters for the \(\beta\) terms. For prior distributions
"t"
,"uniform"
,"normal"
, or"dexp"
, the first element of the list should contain a matrix of location, lower bound, mean, or shape parameters, respectively, for \(\beta\) terms. For prior distributions"t"
,"uniform"
,"normal"
, or"dexp"
, the second element of the list should contain a matrix of shape, upper bound, standard deviation, or scale parameters, respectively, for \(\beta\) terms. For prior distribution"t"
, the third element of the list should contain a matrix of the degrees of freedom for \(\beta\) terms. The third list element should be empty for all other prior distributions. All matrices in the list should have dimensionsdim_x
Xn_cat
, and all elements in then_cat
column should be set toNA
.- gamma_prior_parameters
A numeric list of prior distribution parameters for the \(\gamma\) terms. For prior distributions
"t"
,"uniform"
,"normal"
, or"dexp"
, the first element of the list should contain an array of location, lower bound, mean, or shape parameters, respectively, for \(\gamma\) terms. For prior distributions"t"
,"uniform"
,"normal"
, or"dexp"
, the second element of the list should contain an array of shape, upper bound, standard deviation, or scale parameters, respectively, for \(\gamma\) terms. For prior distribution"t"
, the third element of the list should contain an array of the degrees of freedom for \(\gamma\) terms. The third list element should be empty for all other prior distributions. All arrays in the list should have dimensionsn_cat
Xn_cat
Xdim_z
, and all elements in then_cat
row should be set toNA
.- delta_prior_parameters
A numeric list of prior distribution parameters for the \(\delta\) terms. For prior distributions
"t"
,"uniform"
,"normal"
, or"dexp"
, the first element of the list should contain an array of location, lower bound, mean, or shape parameters, respectively, for \(\delta\) terms. For prior distributions"t"
,"uniform"
,"normal"
, or"dexp"
, the second element of the list should contain an array of shape, upper bound, standard deviation, or scale parameters, respectively, for \(\delta\) terms. For prior distribution"t"
, the third element of the list should contain an array of the degrees of freedom for \(\delta\) terms. The third list element should be empty for all other prior distributions. All arrays in the list should have dimensionsn_cat
Xn_cat
Xn_cat
Xdim_v
, and all elements in then_cat
row should be set toNA
.- number_MCMC_chains
An integer specifying the number of MCMC chains to compute.
- model_file
A .BUG file and used for MCMC estimation with
rjags
.- display_progress
A logical value specifying whether messages should be displayed during model compilation. The default is
TRUE
.