
Fix Label Switching in MCMC Results from a Binary Outcome Misclassification Model
label_switch_2stage.RdFix Label Switching in MCMC Results from a Binary Outcome Misclassification Model
Arguments
- chain_matrix
A numeric matrix containing the posterior samples for all parameters in a given MCMC chain.
chain_matrixmust be a named object (i.e. each parameter must be named asbeta[j, p],gamma[k,j,p], ordelta[l,k,j,p]).- 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\), the first-stage observed outcome, \(Y^*\), and the second-stage observed outcome \(\tilde{Y}\) can take.