Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAPSm weighting #60

Open
barnabasharris opened this issue Apr 29, 2024 · 1 comment
Open

DAPSm weighting #60

barnabasharris opened this issue Apr 29, 2024 · 1 comment

Comments

@barnabasharris
Copy link

Great package! Could this weighting method also be implemented?

https://github.com/gpapadog/DAPSm

@ngreifer
Copy link
Owner

This isn't a weighting method, it's a matching method, and so would be better suited for MatchIt (which I also maintain). However, you can already use the method with MatchIt. I'll provide instructions here in case you are interested in using it within the MatchIt framework.

DAPS involves computing a weighted average between the propensity score distance between units and the spatial distance between units, i.e., $d_{ij} = w * |ps_i - ps_j| + (1 - w) \text{Dist}_{ij}$. You can compute the propensity score distance between units by estimating the propensity score and then supplying it to euclidean_dist(). Then you can compute the spatial distance however you want (e.g., using the instructions in the article). Then you pick a value of $w$ and compute the new distance as w * ps_dist_mat + (1 - w) * spat_dist_mat. You can supply this to the distance argument of matchit() to do whatever kind of matching you want using it (e.g., nearest neighbor, optimal, etc.).

Given that this method is very specific to spatial applications and can be implemented easily without much programming, I'm not inclined to add it as a fixed feature to MatchIt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants