Comments (4)
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.
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.
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.
Thank you very much, appreciate your great help :-)
from matchit.
Related Issues (20)
- Data needs to be randomized before sending it to matchit. Is this desired behaviour? HOT 7
- Weights for t test, chi square test, and effective sample size of subgroups HOT 5
- Match selected samples from both control and treatment cohort HOT 4
- Can glm.nb be used after running matching with Matchit? HOT 1
- Large Dataset with MatchIT HOT 13
- Issue with using exact statement within optimal matching (using MatchIt) HOT 14
- Matching strategy for clusters that don't include both treatment groups - multilevel matching HOT 3
- Issue regarding the unit.id argument HOT 4
- ATT estimate in survival analysis HOT 2
- best way to estimate interactions? HOT 7
- dependency on optmatch HOT 3
- Error installing "MatchIt" HOT 1
- Cardinality matching fails when there is only one covariate
- Running tests fails: Error: could not find function "avg_comparisons", "boot.ci" HOT 3
- Obtaining odds ratios vs risk ratios using avg_comparisons() HOT 1
- Predetermined subsample size HOT 1
- K-nearest neighbor matching for ATE and missing match.matrix HOT 2
- Imputed Data for Matching HOT 2
- Cross-Validation for logistic regression propensity score predictions HOT 3
- Possibility of kernel matching HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matchit.