get_unrefined_balance.PanelBalance | R Documentation |
Extract unrefined covariate balance results, if they exist
## S3 method for class 'PanelBalance'
get_unrefined_balance(pb.object)
pb.object |
|
A PanelBalance
object, with just the unrefined balance results
dem$rdata <- runif(runif(nrow(dem)))
dem.panel <- PanelData(dem, "wbcode2", "year", "dem", "y")
pm.obj <- PanelMatch(lead = 0:3, lag = 4, refinement.method = "mahalanobis",
panel.data = dem.panel, match.missing = TRUE,
covs.formula = ~ tradewb + rdata + I(lag(tradewb, 1:4)) + I(lag(y, 1:4)),
size.match = 5, qoi = "att")
# create multiple configurations to compare
pm2 <- PanelMatch(lead = 0:3, lag = 4, refinement.method = "ps.match",
panel.data = dem.panel, match.missing = TRUE,
covs.formula = ~ tradewb + rdata + I(lag(tradewb, 1:4)) + I(lag(y, 1:4)),
size.match = 5, qoi = "att")
pb <- get_covariate_balance(pm.obj, pm2,
include.unrefined = TRUE,
panel.data = dem.panel,
covariates = c("tradewb", "rdata"))
get_unrefined_balance(pb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.