#Combine the estimated weights with the survey weightsįit <- lm(Y ~ A, data = data, weights = att.weights) W.out <- weightit(A ~ X1 + X2, data = data, s.weights = "S", 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 This can be done using the weighting companion to the MatchIt package, WeightIt (of which I am the author). 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. ![]() ![]() You might consider using weighting, which can accommodate survey weights. ![]() Survey weights cannot be used with matching in this way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |