Code Monkey home page Code Monkey logo

Comments (4)

ngreifer avatar ngreifer commented on September 2, 2024

The propensity scores are stored in the distance column, not the weights columns. weights contains matching weights, and yes, when you do matching without replacement and everyone gets the same number of matches, all weights will be 1. Note these are not "probability weights"; they are matching weights (though they function the same way). They do not depend on the propensity scores at all; they result from the selection of units into the matched sample and, in the case of other forms of matching, on the assignment to pairs or strata. If you want propensity score weighting, use the WeightIt package.

If it's an ordinal covariate, just ensure it is a factor variable. matchit() and all other functions will automatically split it into the dummy variables correctly and you should not do it yourself. If it's an ordinal treatment, that's another story. Matching with multi-category treatments is not straightforward, though I provide an example here. Instead, you should consider propensity score weighting. You can treat the variable as nominal and use multinomial logistic regression or retain its ordinal status and use ordered logistic regression (both available in WeightIt), or you can use a method of weighting other than propensity score weighting (e.g., entropy balancing). Just make sure the treatment is coded as an (ordered) factor.

from matchit.

JoshSchramm94 avatar JoshSchramm94 commented on September 2, 2024

Thank you for your quick reply and helpful advice. I looked into all of this and read a few more articles on propensity score matching or weighting.
I read this article by Wang et al. (2015) in the Journal of Retailing, and it seems to me that they first used a 2:1 nearest neighbor matching (p. 7) and then later used propensity score again as a covariate (p. 9).
De Haan et al. (2018) used propensity score weighting, which has the advantage of using the entire sample (though I could also do this with a full matching approach). However, according to Nielsen and King (2019), it is better to use the Mahalanobis distance. I saw your post on this topic on stackoverflow (https://stackoverflow.com/questions/64967860/use-mahalonobis-distance-and-caliper-in-matchit-package). Also, I read your comment on stackexchange about GenMatch (https://stats.stackexchange.com/questions/511294/what-are-the-pros-and-cons-of-using-mahalanobis-distance-instead-of-propensity-s/511458#511458).
I have tried Nearest Neighbor (2:1 ratio), Full, Propensity Score Weighting, Optimal Matching (2:1 and 3:1) and Mahalanobis Distance (2:1 as well as 3:1). It seems that both Optimal Matching (2:1) and Mahalanobis Distance have the best balance values.
So from what I've read, it's best to try different matching methods and go with the best one, or how do you usually pick the method?

Haan, E. de, Kannan, P. K., Verhoef, P. C., & Wiesel, T. (2018). Device Switching in Online Purchasing: Examining the Strategic Contingencies. Journal of Marketing, 85(5), 1–19. https://doi.org/10.1509/jm.17.0113
Wang, R. J.-H., Malthouse, E. C., & Krishnamurthi, L. (2015). On the Go: How Mobile Shopping Affects Customer Purchase Behavior. Journal of Retailing, 91(2), 217–234. https://doi.org/10.1016/j.jretai.2015.01.002
King, G., & Nielsen, R. (2019). Why Propensity Scores Should Not Be Used for Matching. Political Anal., 27, 435–454

from matchit.

ngreifer avatar ngreifer commented on September 2, 2024

You should use the one that gives the best balance and sample size. There are a few others I would try, though. You should try Genetic matching and you should try full matching on the Mahalanobis distance. I would also recommend trying to incorporate exact matching on as many variables as you can without discarding units. If you are not concerned with generalizability, it might also be a good idea to use a caliper on the propensity score or on the covariates themselves. I detail all of the options available in the MatchIt vignette on matching methods. There are so many options available and there is no reason not to try many until you get excellent balance (measured broadly).

from matchit.

JoshSchramm94 avatar JoshSchramm94 commented on September 2, 2024

Thank you very much, appreciate your great help :-)

from matchit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.