Learn R Programming

twangMediation (version 1.2)

summary.mediation: Displays a useful description of a mediation object.

Description

Displays a useful description of a mediation object.

Usage

# S3 method for mediation
summary(object, ...)

Value

ps_tables

Table of observations' propensity scores

mediator_distribution_check

balance tables for NIE_1 and NIE_0

Arguments

object

A mediation object

...

Additional arguments.

See Also

wgtmed

Examples

Run this code
data("tMdat")

## tMdat is small simulated data set included in twangMediation for 
## demonstrating the functions. See ?tMdat for details

## The tMdat data contains the following variables
## See ?tMdat for details

fit.es.max <- wgtmed(M ~ w1 + w2 + w3,
                      data = tMdat,
                      a_treatment = "A",
                      y_outcome = "Y",
                      total_effect_wts = tMdat$te.wgt,
                      method = "ps",
                      ps_n.trees=1500,
                      ps_shrinkage=0.01,
                      ps_stop.method=c("es.max")
                      )

summary(fit.es.max)

Run the code above in your browser using DataLab