naive_loglik_2stage {COMBO}R Documentation

Observed Data Log-Likelihood Function for Estimation of the Naive Two-Stage Misclassification Model

Description

Observed Data Log-Likelihood Function for Estimation of the Naive Two-Stage Misclassification Model

Usage

naive_loglik_2stage(
  param_current,
  X,
  V,
  obs_Ystar_matrix,
  obs_Ytilde_matrix,
  sample_size,
  n_cat
)

Arguments

param_current

A numeric vector of regression parameters, in the order \beta, \delta. The \delta vector is obtained from the matrix form. In matrix form, the gamma parameter matrix rows correspond to parameters for the \tilde{Y} = 1 observed outcome, with the dimensions of V. In matrix form, the gamma parameter matrix columns correspond to the true outcome categories j = 1, \dots, n_cat. The numeric vector delta_v is obtained by concatenating the delta matrix, i.e. delta_v <- c(delta_matrix).

X

A numeric design matrix for the first-stage observed mechanism.

V

A numeric design matrix for the second-stage observed mechanism.

obs_Ystar_matrix

A numeric matrix of indicator variables (0, 1) for the first-stage 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.

obs_Ytilde_matrix

A numeric matrix of indicator variables (0, 1) for the second-stage observed outcome \tilde{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.

sample_size

Integer value specifying the number of observations in the sample. This value should be equal to the number of rows of the design matrix, X or V.

n_cat

The number of categorical values that the first- and second-stage outcomes, Y^* and \tilde{Y}, can take.

Value

naive_loglik_2stage returns the negative value of the observed data log-likelihood function, \sum_{i = 1}^N \Bigl[ \sum_{k = 1}^2 \sum_{k = 1}^2 \sum_{\ell = 1}^2 y^*_{ik} \tilde{y_i} \text{log} \{ P(\tilde{Y}_{i} = \ell, Y^*_i = k | x_i, v_i) \}\Bigr], at the provided inputs.


[Package COMBO version 1.0.0 Index]