Skip to contents

These functions are methods for class ltmle or summary.ltmle objects.

Usage

# S3 method for ltmle
summary(object, estimator = ifelse(object$gcomp, "gcomp", "tmle"), ...)

# S3 method for ltmleEffectMeasures
summary(object, estimator = ifelse(object$gcomp, "gcomp", "tmle"), ...)

# S3 method for ltmleMSM
summary(object, estimator = ifelse(object$gcomp, "gcomp", "tmle"), ...)

# S3 method for summary.ltmleMSM
print(
  x,
  digits = max(3, getOption("digits") - 3),
  signif.stars = getOption("show.signif.stars"),
  ...
)

# S3 method for summary.ltmle
print(x, ...)

# S3 method for ltmleEffectMeasures
print(x, ...)

# S3 method for summary.ltmleEffectMeasures
print(x, ...)

# S3 method for ltmleMSM
print(x, ...)

# S3 method for ltmle
print(x, ...)

Arguments

object

an object of class "ltmle" or "ltmleMSM" or "ltmleEffectMeasures", usually a result of a call to ltmle or ltmleMSM.

estimator

character; one of "tmle", "iptw", "gcomp". The estimator for which to get effect measures. "tmle" is valid iff the original ltmle/ltmleMSM call used gcomp=FALSE. "gcomp" is valid iff the original ltmle/ltmleMSM call used gcomp=TRUE

...

further arguments passed to or from other methods.

x

an object of class "summary.ltmle" or "summary.ltmleMSM" or "ltmleEffectMeasures", usually a result of a call to summary.ltmle or summary.ltmleMSM.

digits

the number of significant digits to use when printing.

signif.stars

logical. If TRUE, significance stars are printed for each coefficient.

Value

summary.ltmle returns an object of class "summary.ltmle", a list with components

treatment

a list with components summarizing the estimate of object

  • estimate - the parameter estimate of \(E[Y_d]\)

  • std.dev - estimated standard deviation of parameter

  • p.value - two-sided p-value

  • CI - vector of length 2 with 95 percent confidence interval

call

the matched call to ltmle for object

estimator

the estimator input argument

variance.estimate.ratio

ratio of the TMLE based variance estimate to the influence curve based variance estimate

summary.ltmleEffectMeasures returns an object of class "summary.ltmleEffectMeasures", a list with same components as summary.ltmle above, but also includes:

effect.measures

a list with components, each with the same components as treatment in summary.ltmle above

  • treatment - corresponds to the first in the list abar (or rule) passed to ltmle

  • control - corresponds to the second in the list abar (or rule) passed to ltmle

  • ATE - average treatment effect

  • RR - relative risk

  • OR - odds ratio

summary.ltmleMSM returns an object of class "summary.ltmleMSM", a matrix with rows for each MSM parameter and columns for the point estimate, standard error, 2.5percent confidence interval, 97.5percent confidence interval, and p-value.

Details

summary.ltmle returns the parameter value of the estimator, the estimated variance, a 95 percent confidence interval, and a p-value.

summary.ltmleEffectMeasures returns the additive treatment effect for each of the two objects in the abar list passed to ltmle. Relative risk, and odds ratio are also returned, along with the variance, confidence interval, and p-value for each.

summary.ltmleMSM returns a matrix of MSM parameter estimates.

See also

Examples


rexpit <- function(x) rbinom(n = length(x), size = 1, prob = plogis(x))

# Compare the expected outcomes under two counterfactual plans: Treatment plan:
# set A1 to 1 if W > 0, set A2 to 1 if W > 1.5, always set A3 to 1 Control plan:
# always set A1, A2, and A3 to 0
W <- rnorm(1000)
A1 <- rexpit(W)
A2 <- rexpit(W + 2 * A1)
A3 <- rexpit(2 * A1 - A2)
Y <- rexpit(W - A1 + 0.5 * A2 + 2 * A3)
data <- data.frame(W, A1, A2, A3, Y)
treatment <- cbind(W > 0, W > 1.5, 1)
control <- matrix(0, nrow = 1000, ncol = 3)
result <- ltmle(data, Anodes = c("A1", "A2", "A3"), Ynodes = "Y", abar = list(treatment,
    control))
#> Qform not specified, using defaults:
#> formula for Y:
#> Q.kplus1 ~ W + A1 + A2 + A3
#> 
#> gform not specified, using defaults:
#> formula for A1:
#> A1 ~ W
#> formula for A2:
#> A2 ~ W + A1
#> formula for A3:
#> A3 ~ W + A1 + A2
#> 
#> Estimate of time to completion: < 1 minute
print(summary(result))
#> Estimator:  tmle 
#> Call:
#> ltmle(data = data, Anodes = c("A1", "A2", "A3"), Ynodes = "Y", 
#>     abar = list(treatment, control))
#> 
#> Treatment Estimate:
#>    Parameter Estimate:  0.76323 
#>     Estimated Std Err:  0.054433 
#>               p-value:  <2e-16 
#>     95% Conf Interval: (0.65654, 0.86991) 
#> 
#> Control Estimate:
#>    Parameter Estimate:  0.46619 
#>     Estimated Std Err:  0.064218 
#>               p-value:  3.8871e-13 
#>     95% Conf Interval: (0.34032, 0.59205) 
#> 
#> Additive Treatment Effect:
#>    Parameter Estimate:  0.29704 
#>     Estimated Std Err:  0.082759 
#>               p-value:  0.00033163 
#>     95% Conf Interval: (0.13484, 0.45925) 
#> 
#> Relative Risk:
#>    Parameter Estimate:  1.6372 
#>   Est Std Err log(RR):  0.15373 
#>               p-value:  0.0013429 
#>     95% Conf Interval: (1.2113, 2.2129) 
#> 
#> Odds Ratio:
#>    Parameter Estimate:  3.6911 
#>   Est Std Err log(OR):  0.38754 
#>               p-value:  0.00075227 
#>     95% Conf Interval: (1.727, 7.8891) 
#> 

## For examples of summary.ltmle and summary.ltmleMSM, see example(ltmle)