Propensity score matching with individual weights

706 views Asked by At

I'm trying to perform propensity score matching on survey data. I'm aware of the package MatchIt which is able to make the matching procedure but can I include in some ways the individual weights? because if I don't consider them, a less relevant observation can be match with a more relevant one. Thank you!

1

There are 1 answers

0
Noah On

Update 2020-11-25 below this answer.

Survey weights cannot be used with matching in this way. You might consider using weighting, which can accommodate survey weights. With weighting, you estimate the propensity score weights using a model that accounts for the survey weights, and then multiply the estimated weights by the survey weights to arrive at your final set of weights.

This can be done using the weighting companion to the MatchIt package, WeightIt (of which I am the author). With your treatment A, outcome Y (I assume continuous for this demonstration), covariates X1 and X2, and sampling weights S, you could run the following:

#Estimate the propensity score weights
w.out <- weightit(A ~ X1 + X2, data = data, s.weights = "S", 
                  method = "ps", estimand = "ATT")

#Combine the estimated weights with the survey weights
att.weights <- w.out$weights * data$S

#Fit the outcome model with the weights
fit <- lm(Y ~ A, data = data, weights = att.weights)

#Estimate the effect of treatment and its robust standard error
lmtest::coeftest(fit, vcov. = sandwich::vcovHC)

It's critical that you assess balance after estimating the weights; you can do that using the cobalt package, which works with WeightIt objects and automatically incorporates the sampling weights into the balance statistics. Prior to estimating the effect, you would run the following:

cobalt::bal.tab(w.out, un = TRUE)

Only if balance was achieved would you continue on to estimating the treatment effect.

There are other ways to estimate weights besides using logistic regression propensity scores. WeightIt provides support for many methods, and almost all of them support sampling weights. The documentation for each method explains whether sampling weights are supported.


MatchIt 4.0.0 now supports survey weights through the s.weights, just like WeightIt. This supplies survey weights to the model used to estimate the propensity scores but otherwise does not affect the matching. If you want units to be paired with other units that have similar survey weights, you should enter the survey weights as a variable to match on or to place a caliper on.