{"id":16276194,"url":"https://github.com/gvegayon/blopmatch","last_synced_at":"2025-04-08T16:50:09.031Z","repository":{"id":144991617,"uuid":"87398314","full_name":"gvegayon/blopmatch","owner":"gvegayon","description":"blopmatch: Matching Estimator based on a Bilevel Optimization Problem","archived":false,"fork":false,"pushed_at":"2019-12-01T07:42:26.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T13:24:34.770Z","etag":null,"topics":["causal-inference","confounding","estimator","matching","nearest-neighbor","nonparametric"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gvegayon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-06T07:14:55.000Z","updated_at":"2019-12-01T07:42:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"cdec9800-48bc-456a-aef7-2d2d83882d81","html_url":"https://github.com/gvegayon/blopmatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvegayon%2Fblopmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvegayon%2Fblopmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvegayon%2Fblopmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvegayon%2Fblopmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gvegayon","download_url":"https://codeload.github.com/gvegayon/blopmatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247887548,"owners_count":21012983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["causal-inference","confounding","estimator","matching","nearest-neighbor","nonparametric"],"created_at":"2024-10-10T18:47:21.542Z","updated_at":"2025-04-08T16:50:09.005Z","avatar_url":"https://github.com/gvegayon.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"blopmatch: Matching Estimator based on a Bilevel Optimization Problem\n================\n\n[![Travis-CI Build Status](https://travis-ci.org/gvegayon/blopmatch.svg?branch=master)](https://travis-ci.org/gvegayon/blopmatch) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/gvegayon/blopmatch?branch=master\u0026svg=true)](https://ci.appveyor.com/project/gvegayon/blopmatch) [![Coverage Status](https://img.shields.io/codecov/c/github/gvegayon/blopmatch/master.svg)](https://codecov.io/github/gvegayon/blopmatch?branch=master)\n\nAn implementation of Díaz, Rau and Rivera (2015) matching estimator for causal inference. The authors propose a matching estimator based on a Bilevel Optimization Problem. In raw terms, the two problems are (1) finding a convex combination that (2) using the closets neighbors possible. The solution to this problem allows computing Treatment Effect estimators that significantly improve balance in case-control studies, and furthermore, can be used for data imputation.\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\nInstallation\n------------\n\n``` r\ndevtools::install_github(\"gvegayon/blopmatch\")\n```\n\nExamples\n--------\n\n``` r\n# Loading the package\nlibrary(blopmatch)\n\n# Simulating data\nset.seed(1331)\nX \u003c- matrix(rnorm(200*5), ncol=5)\n\n# Matching individual 5 to the rest\nans \u003c- blopi_glpk(X[5,,drop=FALSE], X[-5,,drop=FALSE])\n\n# Resulting weights (matches)\nans$lambda\n#\u003e 1 x 199 sparse Matrix of class \"dgCMatrix\"\n#\u003e                                                                           \n#\u003e [1,] . . . . . . . . . . . . . . . . . . . . . 0.3544893 . . . . . . . . .\n#\u003e                                                                          \n#\u003e [1,] . . . . . . . . . . . . . 0.07906414 . . . . . . . . . . . . . . . .\n#\u003e                                                                           \n#\u003e [1,] . . . . . . . . . . . . . . . . . . . . . . . . 0.1294104 . . . . . .\n#\u003e                                                                           \n#\u003e [1,] . . . . . . 0.1187391 . . . . . . . . . . . . . 0.2264866 . . . . . .\n#\u003e                                                                           \n#\u003e [1,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n#\u003e                                                                           \n#\u003e [1,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n#\u003e                                  \n#\u003e [1,] . . 0.09181041 . . . . . . .\n\n# Target vs Projected\nX[5,]\n#\u003e [1] -0.1544987  0.8092365  1.0249792 -0.8404142 -1.2016582\nans$lambda %*% X[-5,]\n#\u003e 1 x 5 Matrix of class \"dgeMatrix\"\n#\u003e            [,1]      [,2]     [,3]       [,4]      [,5]\n#\u003e [1,] -0.1544987 0.8092365 1.024979 -0.8404142 -1.201658\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvegayon%2Fblopmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvegayon%2Fblopmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvegayon%2Fblopmatch/lists"}