Package: COMMA 1.1.1

COMMA: Correcting Misclassified Mediation Analysis

Use three methods to estimate parameters from a mediation analysis with a binary misclassified mediator. These methods correct for the problem of "label switching" using Youden's J criteria. A detailed description of the analysis methods is available in Webb and Wells (2024), "Effect estimation in the presence of a misclassified binary mediator" <doi:10.48550/arXiv.2407.06970>.

Authors:Kimberly Webb [aut, cre]

COMMA_1.1.1.tar.gz
COMMA_1.1.1.zip(r-4.7)COMMA_1.1.1.zip(r-4.6)COMMA_1.1.1.zip(r-4.5)
COMMA_1.1.1.tgz(r-4.6-any)COMMA_1.1.1.tgz(r-4.5-any)
COMMA_1.1.1.tar.gz(r-4.6-any)COMMA_1.1.1.tar.gz(r-4.5-any)
COMMA_1.1.1.tgz(r-4.5-emscripten)
COMMA.pdf |COMMA.html
COMMA/json (API)

# Install 'COMMA' in R:
install.packages('COMMA', repos = c('https://kimberlywebb.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/kimberlywebb/comma/issues

Datasets:
  • NCHS2022_sample - Example data from the National Vital Statistics System of the National Center for Health Statistics (NCHS), 2022

On CRAN:

Conda:

4.04 score 11 scripts 258 downloads 9 exports 28 dependencies

Last updated from:01b953a5ed. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK164
source / vignettesOK238
linux-release-x86_64OK153
macos-release-arm64OK101
macos-oldrel-arm64OK129
windows-develOK123
windows-releaseOK121
windows-oldrelOK115
wasm-releaseOK125

Exports:COMMA_dataCOMMA_EMCOMMA_EM_bootstrap_SECOMMA_OLSCOMMA_OLS_bootstrap_SECOMMA_PVWCOMMA_PVW_bootstrap_SEmisclassification_probtrue_classification_prob

Dependencies:clicodetoolsdoParalleldplyrforeachgenericsglueiteratorslatticelifecyclemagrittrMASSMatrixMatrixModelsnumDerivpillarpkgconfigquantregR6rlangSparseMsurvivaltibbletidyselectturboEMutf8vctrswithr

COMMA Notation Guide

Rendered fromCOMMA_Notation_Guide.Rmdusingknitr::knitron Apr 16 2026.

Last update: 2024-06-18
Started: 2024-06-05

Demonstration of the COMMA R Package

Rendered fromCOMMA_demo.Rmdusingknitr::knitron Apr 16 2026.

Last update: 2024-07-06
Started: 2024-06-05

Readme and manuals

Help Manual

Help pageTopics
EM-Algorithm Estimation of the Binary Outcome Misclassification ModelCOMBO_EM_algorithm
EM-Algorithm Function for Estimation of the Misclassification ModelCOMBO_EM_function
Compute E-step for Binary Outcome Misclassification Model Estimated With the EM-AlgorithmCOMBO_weight
Generate Bootstrap Samples for Estimating Standard ErrorsCOMMA_boot_sample
Generate Data to use in COMMA FunctionsCOMMA_data
EM Algorithm Estimation of the Binary Mediator Misclassification ModelCOMMA_EM
Estimate Bootstrap Standard Errors using EMCOMMA_EM_bootstrap_SE
Ordinary Least Squares Estimation of the Binary Mediator Misclassification ModelCOMMA_OLS
Estimate Bootstrap Standard Errors using OLSCOMMA_OLS_bootstrap_SE
Predictive Value Weighting Estimation of the Binary Mediator Misclassification ModelCOMMA_PVW
Estimate Bootstrap Standard Errors using PVWCOMMA_PVW_bootstrap_SE
EM Algorithm Function for Estimation of the Misclassification ModelEM_function_bernoulliY
EM Algorithm Function for Estimation of the Misclassification ModelEM_function_bernoulliY_XM
EM Algorithm Function for Estimation of the Misclassification ModelEM_function_normalY
EM Algorithm Function for Estimation of the Misclassification ModelEM_function_normalY_XM
EM Algorithm Function for Estimation of the Misclassification ModelEM_function_poissonY
EM Algorithm Function for Estimation of the Misclassification ModelEM_function_poissonY_XM
Compute Conditional Probability of Observed Mediator Given True Mediator, for Every Subjectmisclassification_prob
Example data from the National Vital Statistics System of the National Center for Health Statistics (NCHS), 2022NCHS2022_sample
Compute Probability of Each True Outcome, for Every Subjectpi_compute
Compute Conditional Probability of Each Observed Outcome Given Each True Outcome, for Every Subjectpistar_compute
Sum Every "n"th Elementsum_every_n
Sum Every "n"th Element, then add 1sum_every_n1
Likelihood Function for Normal Outcome Mechanism with a Binary Mediatortheta_optim
Likelihood Function for Normal Outcome Mechanism with a Binary Mediator and an Interaction Termtheta_optim_XM
Compute Probability of Each True Mediator, for Every Subjecttrue_classification_prob
Compute E-step for Binary Mediator Misclassification Model Estimated With the EM Algorithmw_m_binaryY
Compute E-step for Binary Mediator Misclassification Model Estimated With the EM Algorithmw_m_normalY
Compute E-step for Binary Mediator Misclassification Model Estimated With the EM Algorithmw_m_poissonY