data(lalonde, package = "cobalt")
b1 <- bal.tab(treat ~ age + race + married, data = lalonde,
int = TRUE)
v1 <- var.names(b1, type = "vec", minimal = TRUE)
v1["age"] <- "Age (Years)"
v1["race"] <- "Race/Eth"
v1["married"] <- "Married"
love.plot(b1, var.names = v1)
if (FALSE) {
b2 <- bal.tab(treat ~ age + race + married + educ + nodegree +
re74 + re75 + I(re74==0) + I(re75==0),
data = lalonde)
var.names(b2, file = "varnames.csv")
##Manually edit the CSV (e.g., in Excel), then save it.
v2 <- read.csv("varnames.csv")
love.plot(b2, var.names = v2)
}
Run the code above in your browser using DataLab