Package: COMMA 1.1.0

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.0.tar.gz
COMMA_1.1.0.zip(r-4.5)COMMA_1.1.0.zip(r-4.4)COMMA_1.1.0.zip(r-4.3)
COMMA_1.1.0.tgz(r-4.4-any)COMMA_1.1.0.tgz(r-4.3-any)
COMMA_1.1.0.tar.gz(r-4.5-noble)COMMA_1.1.0.tar.gz(r-4.4-noble)
COMMA_1.1.0.tgz(r-4.4-emscripten)COMMA_1.1.0.tgz(r-4.3-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'))

Peer review:

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:

5.11 score 7 scripts 193 downloads 9 exports 29 dependencies

Last updated 20 days agofrom:361bd4c982. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 30 2024
R-4.5-winOKOct 30 2024
R-4.5-linuxOKOct 30 2024
R-4.4-winOKOct 30 2024
R-4.4-macOKOct 30 2024
R-4.3-winOKOct 30 2024
R-4.3-macOKOct 30 2024

Exports:COMMA_dataCOMMA_EMCOMMA_EM_bootstrap_SECOMMA_OLSCOMMA_OLS_bootstrap_SECOMMA_PVWCOMMA_PVW_bootstrap_SEmisclassification_probtrue_classification_prob

Dependencies:clicodetoolsdoParalleldplyrfansiforeachgenericsglueiteratorslatticelifecyclemagrittrMASSMatrixMatrixModelsnumDerivpillarpkgconfigquantregR6rlangSparseMsurvivaltibbletidyselectturboEMutf8vctrswithr

COMMA Notation Guide

Rendered fromCOMMA_Notation_Guide.Rmdusingknitr::knitron Oct 30 2024.

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

Demonstration of the COMMA R Package

Rendered fromCOMMA_demo.Rmdusingknitr::knitron Oct 30 2024.

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