Mediation Analysis for Count and Zero-Inflated Count Data
Overview
Performs causal mediation analysis for count and zero-inflated count data without or with a post-treatment confounder; calculates power to detect prespecified causal mediation effects, direct effects, and total effects; performs sensitivity analysis when there is a treatment- induced mediator-outcome confounder as described by Cheng, J., Cheng, N.F., Guo, Z., Gregorich, S., Ismail, A.I., Gansky, S.A. (2018) doi:10.1177/0962280216686131. Implements Instrumental Variable (IV) method to estimate the controlled (natural) direct and mediation effects, and compute the bootstrap Confidence Intervals as described by Guo, Z., Small, D.S., Gansky, S.A., Cheng, J. (2018) doi:10.1111/rssc.12233. This software was made possible by Grant R03DE028410 from the National Institute of Dental and Craniofacial Research, a component of the National Institutes of Health.
- Added Authors@R field in the DESCRIPTION file
- Added the missing package anchors to mediate_iv.R, mediate_zi.R and mediate_zi_vcoef.R
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 7includes a package overview page
- Examples that run
- 100%5 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 71%
Downloads
Dependencies
Installing maczic adds 72 packages (40 with compiled code, 76 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Package metadata
- First published
- 2020-11-09
- Total releases
- 4 / 6 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.0
- Bundled data
- 0.7 KB / 1 file
- Download size
- 302 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("maczic")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.