pistar_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
pistar_compute_for_chains(chain_colMeans, Z, n, n_cat)
Arguments
chain_colMeans |
A numeric vector containing the posterior means for all
sampled parameters in a given MCMC chain. |
Z |
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
pistar_compute_for_chains
returns a matrix of conditional probabilities,
for each of the
n
subjects. Rows of the matrix
correspond to each subject and observed outcome. Specifically, the probability
for subject and observed category $0$ occurs at row
. The probability
for subject
and observed category $1$ occurs at row
n
.
Columns of the matrix correspond to the true outcome categories
n_cat
.