misclassification_prob2
returns a dataframe containing five columns.
The first column, Subject
, represents the subject ID, from \(1\) to n
,
where n
is the sample size, or equivalently, the number of rows in z2_matrix
.
The second column, Y
, represents a true, latent outcome category \(Y \in \{1, 2 \}\).
The third column, Ystar1
, represents a first-stage observed outcome category \(Y^{*(1)} \in \{1, 2 \}\).
The fourth column, Ystar2
, represents a second-stage observed outcome category \(Y^{*(2)} \in \{1, 2 \}\).
The last column, Probability
, is the value of the equation
\(\frac{\text{exp}\{\gamma^{(2)}_{\ell kj0} + \gamma^{(2)}_{\ell kjZ^{(2)}} Z^{(2)}\}}{1 + \text{exp}\{\gamma^{(2)}_{\ell kj0} + \gamma^{(2)}_{\ell kjZ^{(2)}} Z^{(2)}_i\}}\)
computed for each subject, first-stage observed outcome category, second-stage
observed outcome category, and true, latent outcome category.