Package: tvmediation 1.1.0

Donna Coffman

tvmediation: Time Varying Mediation Analysis

Provides functions for estimating mediation effects that vary over time as described in Cai X, Coffman DL, Piper ME, Li R. Estimation and inference for the mediation effect in a time-varying mediation model. BMC Med Res Methodol. 2022;22(1):1-12.

Authors:Donna Coffman [aut, cre], Xizhen Cai [aut], Yajnaseni Chakraborti [aut], Harry Zobel [ctb]

tvmediation_1.1.0.tar.gz
tvmediation_1.1.0.zip(r-4.5)tvmediation_1.1.0.zip(r-4.4)tvmediation_1.1.0.zip(r-4.3)
tvmediation_1.1.0.tgz(r-4.4-any)tvmediation_1.1.0.tgz(r-4.3-any)
tvmediation_1.1.0.tar.gz(r-4.5-noble)tvmediation_1.1.0.tar.gz(r-4.4-noble)
tvmediation_1.1.0.tgz(r-4.4-emscripten)tvmediation_1.1.0.tgz(r-4.3-emscripten)
tvmediation.pdf |tvmediation.html
tvmediation/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/dcoffman/tvmediation/issues

Datasets:
  • smoker - Wisconsin Smokers' Health Study 2

On CRAN:

4 exports 3 stars 1.10 score 32 dependencies 68 scripts 149 downloads

Last updated 2 years agofrom:03c740fca3. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 07 2024
R-4.5-winNOTESep 07 2024
R-4.5-linuxNOTESep 07 2024
R-4.4-winNOTESep 07 2024
R-4.4-macNOTESep 07 2024
R-4.3-winOKSep 07 2024
R-4.3-macOKSep 07 2024

Exports:LongToWidetvmatvma_3trttvmb

Dependencies:clicolorspacedplyrfansifarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclelocpolmagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigR6RColorBrewerrlangscalestibbletidyselectutf8vctrsviridisLitewithr

Time Varying Mediation Function: Binary Outcome and Two Treatment Groups

Rendered fromTVMB_Function_for_Binary_Outcome.Rmdusingknitr::rmarkdown_notangleon Sep 07 2024.

Last update: 2022-05-13
Started: 2020-03-05

Time Varying Mediation Function: Continuous Outcome and Three Treatment Groups

Rendered fromTVMA_Function_3_Treatment.Rmdusingknitr::rmarkdown_notangleon Sep 07 2024.

Last update: 2022-05-13
Started: 2020-04-01

Time Varying Mediation Function: Continuous Outcome and Two Treatment Groups

Rendered fromTime_Varying_Mediation_Analysis.Rmdusingknitr::rmarkdown_notangleon Sep 07 2024.

Last update: 2022-05-13
Started: 2019-05-22

Readme and manuals

Help Manual

Help pageTopics
Bootstrap function for computing CIs for coefficients for a continuous outcome and two treatment groupsbootci_coeff_2trt
Bootstrap samples to estimate confidence intervals for coefficients for a continuous outcome and three treatment groups.bootci_coeff_3trt
Bootstrap samples to estimate confidence intervals for binary outcome coefficients.bootci_coeff_binary
Bootstrap samples to estimate confidence intervals for continuous outcome and three treatment groups.bootci_tvm_3trt
Bootstrap samples to estimate confidence intervals for the mediation effect for a binary outcome.bootci_tvmb
Function to estimate coefficients at time tcoeff
Bootstrapping samples to estimate mediation effects confidence intervals for continuous outcome and two treatment (exposure) groups.estBootCIs
Function to estimate coefficients at time t.estCoeff
Function to transpose the data from long to wide formatLongToWide
Function to compute new Mediator and Outcome using time t and t-1 mean centered on the individual.newMediatorOutcome
Wisconsin Smokers' Health Study 2smoker
Function to compute local polynomial estimation using rule of thumb for bandwidth selectionsmoothest
Time Varying Mediation Function: Continuous Outcome and Two Treatment Groupstvma
Time Varying Mediation Function: Continuous Outcome and Three Treatment Groupstvma_3trt
Time Varying Mediation Function: Binary Outcome and Two Treatment Groupstvmb
Main function for time varying mediation function for continuous outcome and three treatment arms (i.e., exposure groups).tvmcurve_3trt