summary.txshift: Summary for Counterfactual Mean Under Stochastic Intervention

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Summary for Counterfactual Mean Under Stochastic Intervention

Usage

1
2
## S3 method for class 'txshift'
summary(object, ..., ci_level = 0.95, digits = 4)

Arguments

object

An object of class txshift, as produced by invoking the function txshift, for which a confidence interval is to be computed.

...

Other arguments. Not currently used.

ci_level

A numeric indicating the level of the confidence interval to be computed.

digits

A numeric scalar giving the number of digits to be displayed or to round results to.

Details

Print a convenient summary for objects computed using txshift.

Value

None. Called for the side effect of printing a summary of particular slots of objects of class txshift.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
set.seed(429153)
n_obs <- 100
W <- replicate(2, rbinom(n_obs, 1, 0.5))
A <- rnorm(n_obs, mean = 2 * W, sd = 1)
Y <- rbinom(n_obs, 1, plogis(A + W + rnorm(n_obs, mean = 0, sd = 1)))
txout <- txshift(
  W = W, A = A, Y = Y, delta = 0.5,
  estimator = "tmle",
  g_fit_args = list(
    fit_type = "hal", n_bins = 5,
    grid_type = "equal_mass",
    lambda_seq = exp(-1:-9)
  ),
  Q_fit_args = list(
    fit_type = "glm",
    glm_formula = "Y ~ ."
  )
)
summary(txout)

txshift documentation built on Oct. 23, 2020, 8:27 p.m.