w_j_2stage {COMBO} | R Documentation |
Compute E-step for Two-Stage Binary Outcome Misclassification Model Estimated With the EM-Algorithm
w_j_2stage(
ystar_matrix,
ytilde_matrix,
pitilde_array,
pistar_matrix,
pi_matrix,
sample_size,
n_cat
)
ystar_matrix |
A numeric matrix of indicator variables (0, 1) for the observed
outcome |
ytilde_matrix |
A numeric matrix of indicator variables (0, 1) for the observed
outcome |
pitilde_array |
A numeric array of conditional probabilities obtained from
the internal function |
pistar_matrix |
A numeric matrix of conditional probabilities obtained from
the internal function |
pi_matrix |
A numeric matrix of probabilities obtained from the internal
function |
sample_size |
An integer value specifying the number of observations in
the sample. This value should be equal to the number of rows of the observed
outcome matrices, |
n_cat |
The number of categorical values that the true outcome, |
w_j
returns a matrix of E-step weights for the EM-algorithm,
computed as follows:
\sum_{k = 1}^2 \sum_{\ell = 1}^2 \frac{y^*_{ik} \tilde{y}_{i \ell} \tilde{\pi}_{i \ell kj} \pi^*_{ikj} \pi_{ij}}{\sum_{h = 1}^2 \tilde{\pi}_{i \ell kh} \pi^*_{ikh} \pi_{ih}}
.
Rows of the matrix correspond to each subject. Columns of the matrix correspond
to the true outcome categories j = 1, \dots,
n_cat
.