Академический Документы
Профессиональный Документы
Культура Документы
Radius matching
STATA> psmatch2 treat x1 x2 x3 x4 x5, logit radius caliper(0.10)
Kernel matching
// Kernel matching, PS estimated with logistic regression
STATA> psmatch2 treat x1 x2 x3 x4 x5, kernel logit
// Perform kernel matching, bandwidth=0.10
STATA> psmatch2 treat x1 x2 x3 x4 x5, kernel logit bwidth(0.10)
// Estimate ATT for outcome variable(s)
STATA> psmatch2 treat x1 x2 x3 x4 x5, kernel outcome(cont_out)
Effect estimates
// ATT (default estimand) for both outcome variables
STATA> psmatch2 treat x1 x2 x3 x4 x5, outcome(cont_out bin_out) logit
// Regression approach: Equivalent to ATT estimates from psmatch2
// First generate weights from psmatch2
STATA> psmatch2 treat x1 x2 x3 x4 x5, logit
STATA> regress cont_out treat [iweight=_weight] if _weight!=.
// Regression including covariates
STATA> regress cont_out treat x1 x2 x3 x4 x5 [iweight=_weight] if _weight!=.
Balance diagnostics
// Balance table and plot
STATA> pstest x1 x2 x3 x4 x5, both graph
Mahalanobis matching
// 1:1 Mahalanobis matching, ATT effect
STATA> teffects nnmatch (cont_out x1 x2 x3 x4 x5) (treat), atet
SUBCLASSIFICATION
Creating 5 propensity score subclasses
// After generating propensity score, can create quintiles
STATA> xtile pscore_5 = pscore, nq(5)