The mecor Package

This package for R implements measurement error correction methods for measurement error in a continuous covariate or outcome in a linear model with a continuous outcome.


The package can be installed via

devtools::install_github("LindaNab/mecor", build_vignettes = TRUE)

Quick demo

# load the internal covariate validation study
data("vat", package = "mecor")
# correct the biased exposure-outcome association
mecor(ir_ln ~ MeasError(substitute = wc, reference = vat) + age + sex + tbf, data = vat, method = "standard")

More examples

Browse the vignettes of the package for more information.

browseVignettes(package = "mecor")


Key reference

References to methods implemented in the package