Learn R Programming

twangMediation (version 1.2.1)

bal.table.mediation: Compute the balance table for mediation object

Description

Compute the balance table for mediation object

Usage

bal.table.mediation(x, digits = 3, ...)

Value

res

tables detailing covariate balance across exposure groups both before and after weighting

Arguments

x

A mediation object

digits

Number of digits to round to. Dafault: 3

...

Additional arguments.

See Also

print.bal.table.mediation, wgtmed

Examples

Run this code
data("tMdat")

## tMdat is small simulated data set included in twangMediation for 
## demonstrating the functions. 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 = "logistic"
                      )

bal.table.mediation(fit.es.max)

Run the code above in your browser using DataLab