Feed on
Posts
Comments

Propensity Score Matching in SPSS

Rosenbaum and Rubin (1983) proposed the use of propensity score as a balancing mechanism when forming matched treatment and control groups in non-experimental research.  Balancing scores (i.e., propensity scores) can be calculated and then applied to form a new group of treated and control units, thus permitting direct and meaningful comparisons. (Rosenbaum & Rubin, 1983).  The use of propensity score matching as a method for controlling selection bias in quasi-experimental has increased in recent years and the most common application of propensity score estimates is for matching (Stone & Tang, 2013).

Propensity score matching (PSM) is a data analysis feature built into the later versions of the Statistical Package for Social Science (SPSS) software.  There are two options available to users wishing to apply PSM in SPSS. First, there is standard propensity score matching option in SPSS.  And secondly, users have the option of uploading a custom PSM program into SPSS.  My experience (and the focus of this blog topic) with propensity score matching in SPSS is with Thoemmes (2012) custom PSM program, (hereafter, PSM for SPSS).  After installation (which proved to be a challenging process), I was able to apply the program to create a well-matched treatment and control group based on a determined propensity score, 1-1 matching and .25 caliper setting.  Details of this program (e.g., installation and features) and the matching function performed are next presented.

PSM for SPSS Custom Dialogue

The PSM for SPSS is a custom “add on” program specifically developed by Thoemmes (2012) for SPSS.  Although, other propensity score matching programs are available, most of these programs tend to be written in highly technical programs (i.e., R or SAS) that are difficult to understand or easy to apply in social science research (Thoemmes, 2012; Ho, Imai, King & Stuart, 2007).  PSM for SPSS was written to overcome these restrictions by utilizing SPSS’s familiar point and click user-friendly interface (Thoemmes, 2012). However, as a custom program, the integration of the program does require installing other external programs before embedding it into SPSS.  After the loading process, propensity score matching (labeled “ps matching”) will appear under the “Analyze” tab in SPSS and is ready for use.

PSM for SPSS utilizes the R “MatchIt” program developed by Ho, Imai, King and Stuart’s (2007) and is capable of implementing “the vast majority of the matching procedures suggested in the diverse scholarly literatures on this subject” (p. 233).  Thoemmes (2012) offers a concise summary of the Matchit program:

The program … is written as so-called custom dialog in SPSS and works with (different) versions … of SPSS.  The custom dialog provides the user with the familiar (SPSS) point-and-click interface … The “ps matching” program performs all analyses in R through the SPSS R-Plug-in and makes  use of newly writer R code … and some R packages written by other researcher … The “MatchIt” packages is used in a central way … analytical choices are guided by the work of the authors of the “MatchIt” package (Ho, Imai, King & Stuart, 2007) (p. 7)

The MatchIt program takes an existing dataset, calculates a propensity score for the treatment and control units and then applies this score to produce “a single preprocessed matched data set. The preprocessed data set can then be used by standard parametric software just as one would have used the original data set” (Ho, Imai, King & Stuart, 2007, p. 233). MatchIt is capable of performing different matches including nearest neighbor, subclass or exact matching.  It has a caliper (e.g., a distance measure) matching feature to allow users to specify tighter propensity score matching between the treatment and control group (Thoemmes, 2012). Finally, MatchIt output report provides a dataset of the matched treatment and control groups as well as listing the propensity score for each matched unit.  Additionally, SPSS generates graphical (i.e., diagnostic diagrams or plots) and statistical data to allow the user to assess how well the newly formed groups are balanced on  covariates, including data on standardized mean differences between groups.

Installing Propensity Score Matching (Thoemmes) in SPSS

The SPSS program is to be installed on the computer where PSM for SPSS will be executed. As previously noted, the custom dialog program install process requires downloading other executable files sourced from other websites.  Thoemmes (2012) provides a good overview of download requirements, however, much of the detailed steps, as related to the other necessary programs are not fully described.  Nor is there much information on how to interpret the post-matching reports generated by the program. And sadly, there has been no update to Thoemmes 2012 document.  Further, a number of changes have occurred to software (i.e., SPSS, R, R Essential, etc) requirements for installing PSM for SPSS. Therefore, give the limited available information on installing PSM for SPSSS; I wanted to share a bit more specific details as to the process.

The first requirement is to download the R program and R Essentials for SPSS onto the computer – both of which are distinct (e.g., separate) programs. R contains the execution files for propensity score matching and R Essentials is the IBM program which enables R to run in SPSS.  To download R, the user needs to access the CRAN (stands for Comprehensive Research Archive Network) website (https://www.r-project.org/about.html).  Once in the site, R may be downloaded from any one of the many CRAN website locations which are called mirrors. Mirrors enable for the efficient download of R (current and older versions) by making the program available in different websites in the U.S and worldwide. Each version of SPSS requires a specific version of the R program. For example, SPSS version 25 (present version of SPSS utilized for the analysis) requires R 3.3.0, which I downloaded from the University of California, Berkeley CRAN mirror website.

After downloading the R program, the next step is to download R Essentials from IBM’s GitHub website; the only site where R Essentials (which confusingly is also called SPSS R plug-in) is available.  R Essentials allows PSM for SPSS to be integrated within SPSS.  Access to R Essentials is free, but requires the user to register in IBM’s GitHub site.  Registration is completed by creating a user ID and password. IMPORTANT: Each SPSS version will requires a specific companion version of R Essentials to allow the program to be operable.  Newer and previous versions of SPSS are not backwards compatible.

After installing R and R Essential, the final step is to load the PSM for SPSS custom dialog file into your computer.  The PSM for SPSS contains the executable code required to perform the propensity score match (Thoemmes, 2012). PSM for SPSS file can be downloaded from the sourceforge website (https://sourceforge.net/projects/psmspss/ website).  Current and previous versions of the PSM for SPSS program will work in any version of SPSS.  After successful installation of the PSM for SPSS program, the “ps matching” will be displayed in SPSS under the “Analyze” menu tab.

Hopefully this information is helpful in your attempts to integrate PSM into SPSS custom program.  This related video link  (https://www.youtube.com/watch?v=2kvmJa08YMI&list=PLNiBe_9WsBK-4m07fGIU1DG9hl6tv-yc-)  is very informative.  Please share your experiences and challenges in integrating Thoemmes PSM matching in SPSS and using the program for analysis. Be sure to include your version of SPSS and the R version.

Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to toolbar