Skip to contents

Classification Probabilities

true_classification_prob()
Compute Probability of Each True Mediator, for Every Subject
misclassification_prob()
Compute Conditional Probability of Observed Mediator Given True Mediator, for Every Subject

Estimation

Functions to estimate regression parameters and standard errors

COMMA_EM()
EM Algorithm Estimation of the Binary Mediator Misclassification Model
COMMA_EM_bootstrap_SE()
Estimate Bootstrap Standard Errors using EM
COMMA_PVW()
Predictive Value Weighting Estimation of the Binary Mediator Misclassification Model
COMMA_PVW_bootstrap_SE()
Estimate Bootstrap Standard Errors using PVW
COMMA_OLS()
Ordinary Least Squares Estimation of the Binary Mediator Misclassification Model
COMMA_OLS_bootstrap_SE()
Estimate Bootstrap Standard Errors using OLS

Data generation for examples and sample datasets

Function to generate data with misclassified binary outcomes

COMMA_data()
Generate Data to use in COMMA Functions
NCHS2022_sample
Example data from the National Vital Statistics System of the National Center for Health Statistics (NCHS), 2022

Internals

Internal functions and helpers

COMBO_EM_algorithm()
EM-Algorithm Estimation of the Binary Outcome Misclassification Model
COMBO_EM_function()
EM-Algorithm Function for Estimation of the Misclassification Model
COMBO_weight()
Compute E-step for Binary Outcome Misclassification Model Estimated With the EM-Algorithm
COMMA_boot_sample()
Generate Bootstrap Samples for Estimating Standard Errors
EM_function_bernoulliY()
EM Algorithm Function for Estimation of the Misclassification Model
EM_function_bernoulliY_XM()
EM Algorithm Function for Estimation of the Misclassification Model
EM_function_normalY()
EM Algorithm Function for Estimation of the Misclassification Model
EM_function_normalY_XM()
EM Algorithm Function for Estimation of the Misclassification Model
EM_function_poissonY()
EM Algorithm Function for Estimation of the Misclassification Model
EM_function_poissonY_XM()
EM Algorithm Function for Estimation of the Misclassification Model
pi_compute()
Compute Probability of Each True Outcome, for Every Subject
pistar_compute()
Compute Conditional Probability of Each Observed Outcome Given Each True Outcome, for Every Subject
sum_every_n()
Sum Every "n"th Element
sum_every_n1()
Sum Every "n"th Element, then add 1
theta_optim()
Likelihood Function for Normal Outcome Mechanism with a Binary Mediator
theta_optim_XM()
Likelihood Function for Normal Outcome Mechanism with a Binary Mediator and an Interaction Term
w_m_binaryY()
Compute E-step for Binary Mediator Misclassification Model Estimated With the EM Algorithm
w_m_normalY()
Compute E-step for Binary Mediator Misclassification Model Estimated With the EM Algorithm
w_m_poissonY()
Compute E-step for Binary Mediator Misclassification Model Estimated With the EM Algorithm