pitilde_by_chain {COMBO}R Documentation

Compute the Mean Conditional Probability of Second-Stage Correct Classification, by First-Stage and True Outcome Across all Subjects for each MCMC Chain

Description

Compute the Mean Conditional Probability of Second-Stage Correct Classification, by First-Stage and True Outcome Across all Subjects for each MCMC Chain

Usage

pitilde_by_chain(n_chains, chains_list, V, n, n_cat)

Arguments

n_chains

An integer specifying the number of MCMC chains to compute over.

chains_list

A numeric list containing the samples from n_chains MCMC chains.

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, V.

n_cat

The number of categorical values that the true outcome, YY, the first-stage observed outcome, YY*, and the second-stage observed outcome, Y~\tilde{Y}, can take.

Value

pitilde_by_chain returns a numeric matrix of the average conditional probability P(Y~=jY=j,Y=j,V)P( \tilde{Y} = j | Y^* = j, Y = j, V) across all subjects for each MCMC chain. Rows of the matrix correspond to MCMC chains, up to n_chains. The first column contains the conditional probability P(Y~=1Y=1,Y=1,V)P( \tilde{Y} = 1 | Y^* = 1, Y = 1, V). The second column contains the conditional probability P(Y~=2Y=2,Y=2,V)P( \tilde{Y} = 2 | Y^* = 2, Y = 2, V).


[Package COMBO version 1.1.0 Index]