View source: R/telescope_match.R
balance.tmatch | R Documentation |
Balance diagnostics for Telescope Match objects
balance.tmatch(object, vars, data, comparison = NULL)
object |
an object of class |
vars |
a formula object containing either the treatment or the mediator as the dependent variable (which denotes whether first-stage or second-stage balance diagnostics are returned) and the covariates for which balance diagnostics are requested as the independent variables. Each covariate or function of covariates (e.g. higher-order polynomials or interactions) should be separated by a +. |
data |
the data frame used in the call to
|
comparison |
a binary indicator for if the function should return the balance for the treated group ('1'), for the control group ('0'), or for overall combined balanced ('NULL', the default). |
Provides matching balance diagnostics for tmatch
objects returned by telescope_match
Returns a data frame with the following columns.
variable: Name of covariate
before_0: Pre-matching average of the covariate in the mediator == 0 (if first stage balance) or treatment == 0 (if second stage balance) condition
before_1: Pre-matching average of the covariate in the mediator == 1 (if first stage balance) or treatment == 1 (if second stage balance) condition
after_0: Post-matching average of the covariate in the mediator == 0 (if first stage balance) or treatment == 0 (if second stage balance) condition
after_1: Post-matching average of the covariate in the mediator == 1 (if first stage balance) or treatment == 1 (if second stage balance) condition
before_sd: standard deviation of the outcome (pre-Matching)
before_diff: Pre-matching covariate difference between mediator arms (if first stage balance) or treatment arms (if second stage balance).
before_std_diff: Pre-matching standardized covariate difference between mediator arms (if first stage balance) or treatment arms (if second stage balance), Equal to Before_Diff/SD.
after_diff: Post–matching covariate difference between mediator arms (if first stage balance) or treatment arms (if second stage balance).
after_std_diff: Post-matching standardized covariate difference between mediator arms (if first stage balance) or treatment arms (if second stage balance), Equal to Before_Diff/SD.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.