View source: R/check_balance.R

check_balance | R Documentation |

This function checks the overall balance after statistical matching and plots the distribution of the propensity score in the treated group, the control group, and the matched control group.

```
check_balance(Z, match_object, cov_list, plot_propens, propens)
```

`Z` |
A vector of treatment indicator. |

`match_object` |
An object returned by match_2C or match_2C_mat or match_2C_list. |

`cov_list` |
A vector of names of covariates as appeared in the original dataset. |

`plot_propens` |
Post-matching distribution of the estimated propensity scores in two groups is plotted if TRUE; FALSE by default. |

`propens` |
NULL by default. If plot_propens = TRUE, then a vector of estimated propensity scores satisfying length(propens) = length(Z) needs to be supplied. |

This function returns a data frame of the overall balance after statistical matching. We tabulate the mean of each covariate in the cov_list in the treated group and control groups after matching, and calculate their standardized differences. Standardized difference is defined as the mean difference divided by the pooled standard error before matching.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.