Skip to main content

Matching in R

  • Chapter
  • First Online:
Design of Observational Studies

Part of the book series: Springer Series in Statistics ((SSS))

  • 8462 Accesses

Abstract

The statistical package R is used to construct several matched samples from one data set. The focus is on the mechanics of using R, not on the design of observational studies. The process is made tangible by describing it in detail, closely inspecting intermediate results; however, essentially, three steps are involved, (i) creating a distance matrix, (ii) adding a propensity score caliper to the distance matrix, and (iii) finding an optimal match. One appendix contains a short introduction to R. A second appendix contains short R functions used to create distance matrices used in matching.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • Aitkin, M., Francis, B., Hinde, J., Darnell, R.: Statistical Modelling in R. New York: Oxford University Press (2009)

    Google Scholar 

  • Angrist, J.D., Lavy, V.: Using Maimonides’ rule to estimate the effect of class size on scholastic achievement. Quart J Econ 114, 533–575 (1999)

    Article  Google Scholar 

  • Bertsekas, D.P.: A new algorithm for the assignment problem. Math Program 21, 152–171 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  • Bertsekas, D.P.: Linear Network Optimization. Cambridge, MA: MIT Press (1991)

    MATH  Google Scholar 

  • Campbell, D.T. : Factors relevant to the validity of experiments in social settings. Psychol Bull 54, 297–312 (1957)

    Article  Google Scholar 

  • Card, D., Krueger, A.: Minimum wages and employment: A case study of the fast-food industry in New Jersey and Pennsylvania. Am Econ Rev 84, 772–793 (1994) Data: http://www.irs.princeton.edu/

  • Chambers, J.: Software for Data Analysis: Programming with R. New York: Springer (2008)

    MATH  Google Scholar 

  • Dalgaard, P.: Introductory Statistics with R. New York: Springer (2002)

    MATH  Google Scholar 

  • Dynarski, S.M.: Does aid matter? Measuring the effect of student aid on college attendance and completion. Am Econ Rev 93, 279–288 (2003)

    Article  Google Scholar 

  • Fleiss, J.L., Levin, B., Paik, M.C.: Statistical Methods for Rates and Proportions. New York: Wiley (2001)

    Google Scholar 

  • Hansen, B.B.: Optmatch: Flexible, optimal matching for observational studies. R News 7, 18–24 (2007)

    Google Scholar 

  • Hansen, B.B., Klopfer, S.O.: Optimal full matching and related designs via network flows. J Comp Graph Statist 15, 609–627 (2006)

    Article  MathSciNet  Google Scholar 

  • Ho, D., Imai, K., King, G., Stuart, E.A.: Matching as nonparametric preprocessing for reducing model dependence in parametric causal inference. Polit Anal 15, 199–236 (2007)

    Article  Google Scholar 

  • LaLonde, R.J.: Evaluating the econometric evaluations of training programs with experimental data. Am Econ Rev 76, 604–620 (1986)

    Google Scholar 

  • Maindonald, J., Braun, J.: Data Analysis and Graphics Using R. New York: Cambridge University Press (2001)

    Google Scholar 

  • McCullagh, P., Nelder, J.A. : Generalized Linear Models. New York: Chapman and Hall/CRC (1989)

    MATH  Google Scholar 

  • Ming, K., Rosenbaum, P.R.: A note on optimal matching with variable controls using the assignment algorithm. J Comput Graph Statist 10, 455–463 (2001)

    Article  MathSciNet  Google Scholar 

  • R Development Core Team.: R: A Language and Environment for Statistical Computing. Vienna: R Foundation, http://www.R-project.org (2007)

  • Rosenbaum, P.R., Rubin, D.B.: The central role of the propensity score in observational studies for causal effects. Biometrika 70, 41–55 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  • Rosenbaum, P.R.: From association to causation in observational studies. J Am Statist Assoc 79, 41–48 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  • Rosenbaum, P.R., Rubin, D.B.: Reducing bias in observational studies using subclassification on the propensity score. J Am Statist Assoc 79, 516–524 (1984)

    Article  Google Scholar 

  • Rosenbaum, P.R., Rubin, D.B.: Constructing a control group by multivariate matched sampling methods that incorporate the propensity score. Am Statistician 39, 33–38 (1985)

    Article  Google Scholar 

  • Rosenbaum, P.R.: Permutation tests for matched pairs with adjustments for covariates. Appl Statist 37, 401–411 (1988) (Correction: [27, §3])

    Google Scholar 

  • Rosenbaum, P.R.: Optimal matching in observational studies. J Am Statist Assoc 84, 1024–32 (1989)

    Article  Google Scholar 

  • Rosenbaum, P.R.: A characterization of optimal designs for observational studies. J Roy Statist Soc B 53, 597–610 (1991)

    MATH  MathSciNet  Google Scholar 

  • Rosenbaum, P.R.: Stability in the absence of treatment. J Am Statist Assoc 96, 210–219 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  • Rosenbaum, P.R.: Observational Studies (2nd ed.). New York: Springer (2002)

    MATH  Google Scholar 

  • Rosenbaum, P.R.: Covariance adjustment in randomized experiments and observational studies (with Discussion). Statist Sci 17, 286–327 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  • Rubin, D.B.: Using multivariate matched sampling and regression adjustment to control bias in observational studies. J Am Statist Assoc 74, 318–328 (1979)

    Article  MATH  Google Scholar 

  • Shadish, W. R., Cook, T. D., Campbell, D.T.: Experimental and Quasi-Experimental Designs for Generalized Causal Inference. Boston: Houghton-Mifflin (2002)

    Google Scholar 

  • Wooldridge, J.M.: Econometric Analysis of Cross Section and Panel Data. Cambridge, MA: MIT Press. (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Paul R. Rosenbaum .

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag New York

About this chapter

Cite this chapter

Rosenbaum, P.R. (2010). Matching in R. In: Design of Observational Studies. Springer Series in Statistics. Springer, New York, NY. https://doi.org/10.1007/978-1-4419-1213-8_13

Download citation

Publish with us

Policies and ethics