confint.regmedint: Confidence intervals for mediation prameter estimates.

Description Usage Arguments Value Examples

View source: R/08_regmedint_class_user_methods.R

Description

Construct Wald approximate confidence intervals for the quantities of interest.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'regmedint'
confint(
  object,
  parm = NULL,
  level = 0.95,
  a0 = NULL,
  a1 = NULL,
  m_cde = NULL,
  c_cond = NULL,
  ...
)

Arguments

object

An object of the regmedint class.

parm

For compatibility with generic. Ignored.

level

A numeric vector of length one. Requested confidence level. Defaults to 0.95.

a0

A numeric vector of length one.

a1

A numeric vector of length one.

m_cde

A numeric vector of length one. A 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 regmedint will be used. Only the CDE is affected.

c_cond

A numeric vector as long as the number of adjustment covariates. A set of covariate values at which the conditional natural effects are evaluated.

...

For compatibility with generic.

Value

A numeric matrix of the lower limit and upper limit.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)
confint(regmedint_obj)
## Evaluate at different values
confint(regmedint_obj, m_cde = 0, c_cond = 1)
## Change confidence level
confint(regmedint_obj, m_cde = 0, c_cond = 1, level = 0.99)

regmedint documentation built on May 12, 2021, 9:06 a.m.