check_and_fix_chains {COMBO} | R Documentation |
Check Assumption and Fix Label Switching if Assumption is Broken for a List of MCMC Samples
check_and_fix_chains(
n_chains,
chains_list,
pistarjj_matrix,
dim_x,
dim_z,
n_cat
)
n_chains |
An integer specifying the number of MCMC chains to compute over. |
chains_list |
A numeric list containing the samples from |
pistarjj_matrix |
A numeric matrix of the average
conditional probability |
dim_x |
The number of columns of the design matrix of the true outcome mechanism, |
dim_z |
The number of columns of the design matrix of the observation mechanism, |
n_cat |
The number of categorical values that the true outcome, |
check_and_fix_chains
returns a numeric list of the samples from
n_chains
MCMC chains which have been corrected for label switching if
the following assumption is not met: P(Y^* = j | Y = j, Z) > 0.50 \forall j
.