View source: R/08_regmedint_class_user_methods.R
summary.regmedint | R Documentation |
Summarize the mreg_fit
, yreg_fit
, and the mediation analysis effect estimates.
## S3 method for class 'regmedint' summary( object, a0 = NULL, a1 = NULL, m_cde = NULL, c_cond = NULL, args_mreg_fit = list(), args_yreg_fit = list(), exponentiate = FALSE, level = 0.95, ... )
object |
An object of the |
a0 |
A numeric vector of length 1 |
a1 |
A numeric vector of length 1 |
m_cde |
A numeric vector of length 1 The mediator value at which the controlled direct effect (CDE) conditional on the adjustment covariates is evaluated. If not provided, the default value supplied to the call to |
c_cond |
A numeric vector of the same length as |
args_mreg_fit |
A named list of argument to be passed to the method for the |
args_yreg_fit |
A named list of argument to be passed to the method for the |
exponentiate |
Whether to add exponentiated point and confidence limit estimates. When |
level |
Confidence level for the confidence intervals. |
... |
For compatibility with the generic. Ignored. |
A summary_regmedint
object, which is a list containing the summary objects of the mreg_fit
and the yreg_fit
as well as the mediation analysis results.
library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) ## Detailed result with summary summary(regmedint_obj) ## Add exponentiate results for non-linear outcome models summary(regmedint_obj, exponentiate = TRUE) ## Evaluate at different values summary(regmedint_obj, m_cde = 0, c_cond = 1) ## Change confidence level summary(regmedint_obj, m_cde = 0, c_cond = 1, level = 0.99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.