multimediate_survival {multimediate} | R Documentation |
multimediate_survival - internal function
Description
multimediate_survival - internal function
Usage
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
)
Arguments
lmodel.m |
A list of fitted mediator models ('lm', 'glm', or 'polr' objects). |
correlated |
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'. |
model.y |
A fitted outcome model ('lm', 'glm', 'polr', or 'aalen' object). |
treat |
The name of the treatment variable (character). |
treat.value |
The value representing the treatment condition (default: 1). |
control.value |
The value representing the control condition (default: 0). |
J |
Number of Monte Carlo simulations for effect estimation (default: 1000). |
conf.level |
Confidence level for confidence intervals (default: 0.95). |
fun |
A summary function applied to the simulated effects (default: 'mean'). |
data |
A data frame containing the variables used in the models. |
peryr |
Scaling factor for incidence rates per person-year (default: 100,000). |
verbose |
Logical. If 'TRUE' (default), messages and a progress bar are displayed during execution. |
Value
A list containing estimated direct, indirect (mediated), and total effects, along with confidence intervals and p-values for each.