Skip to contents

Compute E-step for Binary Outcome Misclassification Model Estimated With the EM-Algorithm

Usage

COMBO_weight(ystar_matrix, pistar_matrix, pi_matrix, sample_size, n_cat)

Arguments

ystar_matrix

A numeric matrix of indicator variables (0, 1) for the observed outcome Y*. Rows of the matrix correspond to each subject. Columns of the matrix correspond to each observed outcome category. Each row should contain exactly one 0 entry and exactly one 1 entry.

pistar_matrix

A numeric matrix of conditional probabilities obtained from the internal function pistar_compute. Rows of the matrix correspond to each subject and to each observed outcome category. Columns of the matrix correspond to each true, latent outcome category.

pi_matrix

A numeric matrix of probabilities obtained from the internal function pi_compute. Rows of the matrix correspond to each subject. Columns of the matrix correspond to each true, latent outcome category.

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 matrix, ystar_matrix.

n_cat

The number of categorical values that the true outcome, Y, and the observed outcome, Y*, can take.

Value

COMBO_weight returns a matrix of E-step weights for the EM-algorithm, computed as follows: \(\sum_{k = 1}^2 \frac{y^*_{ik} \pi^*_{ikj} \pi_{ij}}{\sum_{\ell = 1}^2 \pi^*_{i k \ell} \pi_{i \ell}}\). Rows of the matrix correspond to each subject. Columns of the matrix correspond to the true outcome categories \(j = 1, \dots,\) n_cat.