data(ex_dta)
dta_ps <- psrwe_est(ex_dta,
v_covs = paste("V", 1:7, sep = ""),
v_grp = "Group",
cur_grp_level = "current")
## With neighest neighbor
.remark_nnmatch <- function() {
dta_ps_mat <- psrwe_match(dta_ps, ratio = 2, strata_covs = "V1",
seed = 123)
dta_ps_mat
}
## Unmark below to run
# .remark_nnmatch()
## With optmatch
.remark_optmatch <- function() {
warning("The optmatch package may restrict use (academic license).")
dta_ps_opt <- psrwe_match(dta_ps, ratio = 2,
strata_covs = "V1",
method = "optm", seed = 123)
dta_ps_opt
}
## Unmark below to run if optmatch is available.
# .remark_optmatch()
Run the code above in your browser using DataLab