Comments (5)
So funny you asked, both of these features are available in the development version of MatchIt
on my GitHub. With nearest neighbor matching, when an argument to exact
is specified, matching takes place seperately within each level of the exact matching variables, which will speed up execution. I have plans to allow this to be parallelized, too, but I haven't implemented that yet. Also, if you match separately within subgroups (i.e., using different calls to matchit()
), you can now use a special rbind()
method to bind the several match.data()
outputs together into a single output for effect estimation. You do still have to assess balance within each matchit
object separately, though, as these cannot be combined. You can be clever and use the rbind()
output with cobalt
if you retain the unmatched units in the match.data()
calls.
To install the devlopment version on my GitHub, you can run devtools::install_github("ngreifer/MatchIt")
.
from matchit.
from matchit.
Hi Noah, is this new feature implemented from MatchIt 4.2.0? I'm trying optimal pair matching with exact matching on some selected variables, and mahalanobis distance on other variables.
I can't get it to work with the full dataset which has about 500k rows (of which about 150k are in the treated group), i keep running out of memory.... Do i have to use a specific syntax for the matching to take place separately in each level of the exact matching variables? I'm currently using something like this:
match1 <- matchit(
experiment_group ~ .,
method = "optimal",
mahvars = ~ age + children + comedy + drama + ents + factual + learning + music + news + sport ,
exact = c("gender", "acorn_category", "hf"),
data = db
)
from matchit.
Yes, that is a feature in 4.2.0, but only for nearest neighbor matching. Exact matching with optimal matching is handled by the optmatch
package, which may not be able to handle such a large dataset. The ability to handle large datasets is an advantage of nearest neighbor over optimal matching. By setting verbose = TRUE
with method = "nearest"
you can also track the progress within each category of the exact
variables. In general, nearest neighbor and optimal matching yield similar results, so you aren't losing anything by using nearest neighbor.
from matchit.
thank you so much for such a prompt reply, i'll try nearest!
from matchit.
Related Issues (20)
- Provide alt= accessibility attributes for vignettes HOT 3
- Match cases on string distance HOT 1
- Match 1-to-many cases on distances on sum of statistics. HOT 1
- Matching on character variables broken again in 4.5.0 HOT 3
- Use of caliper with optimal pair matching HOT 2
- can't use "quick" method HOT 1
- Summary of balance on variables - redundant and error variables created HOT 3
- Inconsistent results using `MatchIt` (1:1 Nearest Neighbor, Mahalanobis Distance) HOT 5
- Combine diagnostic plots for multiple models HOT 2
- optimal matching failing when not all treatments can be matched HOT 6
- factor variable with distance = "euclidean" triggers warning: variable 'y' is absent, its contrast will be ignored HOT 1
- Optimal Matching & Exact argument throwing incorrect number of dimensions error HOT 8
- Cannot use exact matching with "quick" method HOT 6
- after update to Version 4.5.1 matchit(method = "nearest", exact = c("race", "age") results in reproducible errors HOT 3
- sum of distance of matched pairs are different across platforms
- package 'Matchit' is not available for R version 4.2.3 HOT 2
- Weights from Coarsened exact matching (CEM) appears to be wrong HOT 9
- Small typos in documentation HOT 1
- contradictory information on propensity score estimate HOT 1
- qq plot HOT 2
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.