balance: Balance checking for causal mediation analysis in multisite...

Description Usage Arguments Value Author(s) References Examples

View source: R/msmediate.R

Description

This function is used to check if, within a treatment group, the estimated nonresponse weight balances the distribution of the observed covariates between the respondents and the nonrespondents, or if the estimated RMPW weight balances the distribution of the observed covariates between those whose mediator takes value 1 and those whose mediator takes value 0.

Usage

1
balance(data, y, treatment, mediator, response, XR1, XR0, XM1, XM0, X, site)

Arguments

data

The data set for analysis.

y

The name of the outcome variable (string).

treatment

The name of the treatment variable (string).

mediator

The name of the mediator variable (string).

response

The name of the response variable (string), which is equal to 1 if the individual responded and 0 otherwise.

XR1

A vector of variable names (string) of pretreatment covariates in the propensity score model for the response under the treatment condition. For now, the multilevel propensity score model only allows for one random intercept.

XR0

A vector of variable names (string) of pretreatment covariates in the propensity score model for the response under the control condition. For now, the multilevel propensity score model only allows for one random intercept.

XM1

A vector of variable names (string) of pretreatment covariates in the propensity score model for the mediator under the treatment condition. For now, the multilevel propensity score model only allows for one random intercept.

XM0

A vector of variable names (string) of pretreatment covariates in the propensity score model for the mediator under the control condition. For now, the multilevel propensity score model only allows for one random intercept.

X

A vector of variable names (string) of all the pretreatment covariates to be checked balance for.

site

The variable name for the site ID (string).

Value

A list of tables containing the balance checking results for the response before weighting ($balance.R$balance1 under the treatment condition and $balance.R$balance0 under the control condition) and after weighting ($balance.R$balance1.adj under the treatment condition and $balance.R$balance0.adj under the control condition); and the balance checking results for the mediator before weighting ($balance.M$balance1 under the treatment condition and $balance.M$balance0 under the control condition) and after weighting ($balance.M$balance1.adj under the treatment condition and $balance.M$balance0.adj under the control condition). It also contains a set of balance checking plots corresponding to the tables.

balance.mean

Population average of standardized bias. The standardized bias is calculated by dividing the unweighted (before weighting) or weighted (after weighting) mean difference between response or mediator levels in each covariate by the standard deviation of the covariate

balance.sd

Between-site standard deviation of standardized bias.

balance.lower

Lower bound of the 95% plausible value range of the site-specific standardized bias.

balance.upper

Upper bound of the 95% plausible value range of the site-specific standardized bias.

Author(s)

Xu Qin, Guanglei Hong, Jonah Deutsch, and Edward Bein

References

Qin, X., Hong, G., Deutsch, J., & Bein, E. (2019). Multisite causal mediation analysis in the presence of complex sample and survey designs and non-random non-response. Journal of the Royal Statistical Society: Series A (Statistics in Society), 182(4), 1343-1370. doi: 10.1111/rssa.12446

Examples

1
2
3
4
5
data(sim.weights)

balance(data = sim.weights, y = "y", treatment = "tr", mediator = "me", response = "R",
    XR1 = c("x1", "x2", "x3"), XR0 = c("x1", "x2", "x3"), XM1 = c("x1", "x2", "x3"),
    XM0 = c("x1", "x2", "x3"), X = c("x1", "x2", "x3"), site = "site")

MultisiteMediation documentation built on Sept. 5, 2021, 6:04 p.m.