multimediate_survival - internal function
multimediate_survival(
lmodel.m,
correlated = FALSE,
model.y,
treat,
treat.value = 1,
control.value = 0,
J = 1000,
conf.level = 0.95,
fun = mean,
data = NULL,
peryr = 1e+05,
verbose = TRUE
)A list containing estimated direct, indirect (mediated), and total effects, along with confidence intervals and p-values for each.
A list of fitted mediator models (`lm`, `glm`, or `polr` objects).
a logical value. if 'FALSE' a identity matrix is used for the matrix of correlation of mediators; if 'TRUE' matrix of correlation is estimated. Default is 'FALSE'.
A fitted outcome model (`lm`, `glm`, `polr`, or `aalen` object).
The name of the treatment variable (character).
The value representing the treatment condition (default: 1).
The value representing the control condition (default: 0).
Number of Monte Carlo simulations for effect estimation (default: 1000).
Confidence level for confidence intervals (default: 0.95).
A summary function applied to the simulated effects (default: `mean`).
A data frame containing the variables used in the models.
Scaling factor for incidence rates per person-year (default: 100,000).
Logical. If `TRUE` (default), messages and a progress bar are displayed during execution.