pitilde_compute_for_chains {COMBO} | R Documentation |
Compute Conditional Probability of Each Observed Outcome Given Each True Outcome for a given MCMC Chain, for Every Subject
Description
Compute Conditional Probability of Each Observed Outcome Given Each True Outcome for a given MCMC Chain, for Every Subject
Usage
pitilde_compute_for_chains(chain_colMeans, V, n, n_cat)
Arguments
chain_colMeans |
A numeric vector containing the posterior means for all
sampled parameters in a given MCMC chain. |
V |
A numeric design matrix. |
n |
An integer value specifying the number of observations in the sample.
This value should be equal to the number of rows of the design matrix, |
n_cat |
The number of categorical values that the true outcome, |
Value
pitilde_compute_for_chains
returns a matrix of conditional probabilities,
corresponding to each subject and observed outcome. Specifically, the probability
for subject
and second-stage observed category $1$ occurs at row
. The probability
for subject
and second-stage observed category $2$ occurs at row
n
.
Columns of the matrix correspond to the first-stage outcome categories
n_cat
.
The third dimension of the array corresponds to the true outcome categories,
n_cat
.