
sensmediation
Takes an object from sensmediation
and estimates additional natural direct and indirect effects, with a sensitivity analysis using
the same sensitivity parameter as in the original analysis, without having to redo the optimization to find the estimated regression coefficients.
The effects to be estimated are regulated through the arguments covariates
and alt.decomposition
as described in the documentation
for sensmediation
. The confidence level used is regulated through the argument conf.level
.
more.effects(sensmed.object, conf.level = 0.95, covariates = NULL,
alt.decomposition = FALSE, exp.value = 1, control.value = 0)
Object from sensmediation
for which additional effects are to be calculated.
the confidence level to be used for confidence intervals and uncertainty intervals.
if conditional effects are to be estimated the list of covariate values (see sensmediation
). Covariates not specified are marginalized over.
logical indicating whether alternative definitions of the direct and indirect effects should be used (see sensmediation
).
value of the exposure variable used as the exposure condition, default is 1.
value of the exposure variable used as the control (unexposed) condition, default is 0.
more.effects
returns an object of class "effectsMed"
.
The function summary
(summary.effectsMed
) gives a summary of the results in the form of a table with the estimated
effects and results of the sensitivity analysis. The function plot
(plot.effectsMed
) plots the estimated natural
indirect or direct effects with confidence intervals over the range of the sensitivity parameter.
The matched call
The sensitivity parameter vector.
character, the type of confounding the sensitivity analysis is performed for.
a list with the output from coefs.sensmed
matrix with the estimated NIEs (or NIE*s if alt.decomposition=TRUE
) over the range of the sensitivity parameter Rho
.
matrix with the estimated NDEs (or NDE*s if alt.decomposition=TRUE
) over the range of the sensitivity parameter Rho
.
list with the standard errors of the NIE (NIE*), NDE (NDE*) and total effect over the range of the sensitivity parameter Rho
.
a list with the confidence intervals of the NIE (NIE*), NDE (NDE*) and total effect over the range of the sensitivity parameter Rho
.
matrix with the uncertainty intervals for the NIE (NIE*) and NDE (NDE*) over the range of the sensitivity parameter Rho
.
numeric, the confidence level used for confidence intervals and uncertainty intervals.
list of the covariate values that the effects are conditioned on.
character vector containing the name of the exposure variable.
character vector containing the name of the mediator variable.
logical, indicating whether the alternative definitions of the direct and indirect effects have been used
# NOT RUN {
#First we estimate marginal NIE, NDE with sensitivity analyses to mediator-outcome confounding:
effects.my <- sensmediation(med.model = m.model, out.model = y.model, exp.name = "z",
med.name = "m", Rho = seq(0, 0.5, 0.1))
#Then we want to do the same for conditional NIE, NDE without reestimating the regression
#coefficients:
effects.my.cond <- more.effects(sensmed.object = effects.my, covariates = list(x = 1))
summary(effects.my.cond)
plot(effects.my.cond)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab