summary.ltmle {ltmle} | R Documentation |
Get standard error, p-value, and confidence interval for one ltmle object Summarizing results from Longitudinal Targeted Maximum Likelihood Estimation (ltmle)
Description
These functions are methods for class ltmle
or summary.ltmle
objects.
Usage
## S3 method for class 'ltmle'
summary(object, estimator = ifelse(object$gcomp, "gcomp", "tmle"), ...)
## S3 method for class 'ltmleEffectMeasures'
summary(object, estimator = ifelse(object$gcomp, "gcomp", "tmle"), ...)
## S3 method for class 'ltmleMSM'
summary(object, estimator = ifelse(object$gcomp, "gcomp", "tmle"), ...)
## S3 method for class 'summary.ltmleMSM'
print(
x,
digits = max(3, getOption("digits") - 3),
signif.stars = getOption("show.signif.stars"),
...
)
## S3 method for class 'summary.ltmle'
print(x, ...)
## S3 method for class 'ltmleEffectMeasures'
print(x, ...)
## S3 method for class 'summary.ltmleEffectMeasures'
print(x, ...)
## S3 method for class 'ltmleMSM'
print(x, ...)
## S3 method for class 'ltmle'
print(x, ...)
Arguments
object |
an object of class " |
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 " |
digits |
the number of significant digits to use when printing. |
signif.stars |
logical. If |
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.
Value
summary.ltmle
returns an object of class
"summary.ltmle
", a list with components
treatment |
a list with
components summarizing the estimate of
|
call |
the matched call to |
estimator |
the |
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
|
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.
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))
print(summary(result))
## For examples of summary.ltmle and summary.ltmleMSM, see example(ltmle)