pistar_compute function

Compute Conditional Probability of Each Observed Outcome Given Each True Outcome, for Every Subject

Compute Conditional Probability of Each Observed Outcome Given Each True Outcome, for Every Subject

pistar_compute(gamma, Z, n, n_cat)

Arguments

  • gamma: A numeric matrix of regression parameters for the observed outcome mechanism, Y* | Y

    (observed outcome, given the true outcome) ~ Z (misclassification predictor matrix). Rows of the matrix correspond to parameters for the Y* = 1

    observed outcome, with the dimensions of Z. Columns of the matrix correspond to the true outcome categories j=1,,j = 1, \dots, n_cat.

  • Z: 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, Z.

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

Returns

pistar_compute returns a matrix of conditional probabilities, P(Yi=kYi=j,Zi)=exp{γkj0+γkjZZi}1+exp{γkj0+γkjZZi}P(Y_i^* = k | Y_i = j, Z_i) = \frac{\text{exp}\{\gamma_{kj0} + \gamma_{kjZ} Z_i\}}{1 + \text{exp}\{\gamma_{kj0} + \gamma_{kjZ} Z_i\}}

for each of the i=1,,i = 1, \dots, n subjects. Rows of the matrix correspond to each subject and observed outcome. Specifically, the probability for subject ii and observed category 11 occurs at row ii. The probability for subject ii and observed category 22 occurs at row i+i + n. Columns of the matrix correspond to the true outcome categories j=1,,j = 1, \dots, n_cat.

  • Maintainer: Kimberly Webb
  • License: MIT + file LICENSE
  • Last published: 2024-12-13

Useful links