dot-plot_balance: (For maintainer) Plot balance

.plot_balance.medR Documentation

(For maintainer) Plot balance

Description

Internal functions that makes balance plots for weighted data.

Usage

.plot_balance.med(w.dat, c.vars, m.vars, c.std, m.std, key.balance = FALSE)

.plot_balance.ipw(w.dat, vars, vars.std)

.plot_balance.odds(w.dat, vars, vars.std)

.plot_balance.psYpred(w.dat, c.vars, c.std)

.plot_balance.psYpredMR(w.dat, cross.world, c.vars, m.vars, c.std, m.std)

.plot_balance.YpredMR(w.dat, cross.world, c.vars, m.vars, c.std, m.std)

.plot_balance.wpMRCadj(w.dat, c.vars, m.vars, c.std, m.std)

Arguments

w.dat

Data for (pseudo) subsamples, e.g. output of .compute_weights.Ypred()

c.vars

Names of covariates, already cleaned.

m.vars

Names of mediators, already cleaned.

c.std

Names of covariates whose mean differences are to be standardized, already cleaned.

m.std

Names of mediators whose mean differences are to be standardized, already cleaned.

key.balance

Whether all balance components are crucial to the estimator using the weighting method, defaults to FALSE. See relevance in Value section.

vars

Names of variables whose balance is to be plotted, already cleaned.

vars.std

Names of variables whose mean differences are to be standardized, already cleaned.

cross.world

(For plot_balance.psYpredMR) blah

Value

Plot of balance on the means of covariates and mediators between pseudo subsample(s) and relevant subsample(s).

Plot of balance on the means of covariates and mediators between relevant pseudo samples and full sample. If estimate_wtd==TRUE, add "(anchor)" and "(for <effect>)" notes to plot labels to draw attention to how each balance matters to the estimator.


trangnguyen74/tnMediation documentation built on May 3, 2023, 6:58 a.m.