| summary.PanelBalance | R Documentation |
Summarize covariate balance over time
## S3 method for class 'PanelBalance'
summary(
object,
qoi = NULL,
include.unrefined = TRUE,
unrefined.only = FALSE,
include.treatment.period = TRUE,
...
)
object |
|
qoi |
Character. Valid values include "att", "art", or "atc". Specifying which QOI information to extract and summarize. |
include.unrefined |
logical. Indicates whether or not unrefined balance results should be included in the summary. |
unrefined.only |
logical. Indicates whether or not only unrefined balance results should be included in the summary. |
include.treatment.period |
logical. Indicates whether or not the treatment period should be included in the summary. Default is TRUE. This is recommended to be set to TRUE unless there are strong substantive reasons to do otherwise. |
... |
Not used |
returns a list of matrices with covariate balance results calculated. Each element in the list corresponds to a PanelMatch configuration given to get_covariate_balance() and are returned in order. These elements should also have names that correspond to the names of the PanelMatch variables provided to the function. Note that if a configuration has qoi = "ate", the corresponding element in the returned list will also be a list, containing balance results corresponding to the ATT and ATC. Otherwise, each element in the returned list will be a matrix. Each matrix entry corresponds to balance results for a particular covariate in a particular period. When unrefined balance results are included, users will see additional columns with "_unrefined" appended to covariate names. These correspond to the unrefined balance results for a particular covariate-period. If 'unrefined.only = TRUE', then the names of the elements will have "_unrefined" appended to them.
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")
pb <- get_covariate_balance(pm.obj,
include.unrefined = TRUE,
panel.data = dem.panel,
covariates = c("tradewb", "rdata"))
summary(pb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.