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.
Returns
COMBO_weight returns a matrix of E-step weights for the EM-algorithm, computed as follows: ∑k=12∑ℓ=12πikℓ∗πiℓyik∗πikj∗πij. Rows of the matrix correspond to each subject. Columns of the matrix correspond to the true outcome categories j=1,…,n_cat.