R is a free statistical package that can be downloaded and installed from the website: http://www.r-project.org. Once you get to the website, click on download R, You will be directed to a webpage titled “CRAN Mirrors”. You should click on the URL representing the location that is close to you, which will direct you to a page with download links to R for Linux, MacOS X and Windows.
Installation Instructions
Windows Installation
Note: If you are a Mac user running software such as VMware Fusion, Parallels or Virtual Box, you may also install the Windows version of R on your virtual Windows computer.
- Select the “base” package of R for Windows
- Click on Download R 2.13.2 for Windows, which will allow you to select the .exe file to download the current release
- Save the .exe file on your desktop
- Click on the .exe file to install the software and keep the default settings for the installation
- Select “Finish” once the R program has completed installation.
- For the propensity score matching exercise, you will need to install two programs written in R. Just copy and paste the following script in the R Console window and click the "enter" key to install the MatchIt package.
- install.packages("MatchIt")
- After you see a pop-up window asking you to select a CRAN mirror for use, choose the closest location (e.g., PA1 for the state of Pennsylvania in the US) and the package will start downloading.
- The second package, called "Zelig", is for post-matching regression analysis. Just enter: install.packages("Zelig")
- The third package, called "Design". Just enter: install.packages("Design")
- The fourth package, called "optmatch". Just enter: install.packages("optmatch")
Note: You will need Internet access in order to install all of the add-on packages for R.
We also have a brief video to help you with the installation process:
FAQ for R for Windows: http://cran.r-project.org/bin/windows/rw-FAQ.html#Can-I-run-R-from-a-CD-or-USB-drive_003f
Macintosh Installation
- Go to: http://www.r-project.org and click "MacOS X"
- Click R-2.13.2.pkg (latest version) to download the installer package file to your download folder.
- Once the installer package file is downloaded, double click on the file and you will see a installation window titled Install R 2.13.0 for Mac OS X 10.5 or higher (Leopard Build).
- Click continue, then continue, then agree to the terms of the software license agreement, then click Install and verify the password for your laptop.
- Wait for the message Install Succeeded, then go to your Applications folder. You should be able to double click the R logo and open the R Console window.
- For the propensity score matching exercise, you will need to install two programs written in R. Just copy and paste the following script in the R Console window and click the "enter" key to install the MatchIt package.
- install.packages("MatchIt")
- After you see a pop-up window asking you to select a CRAN mirror for use, choose the closest location (e.g., PA1 for the state of Pennsylvania in the US) and the package will start downloading.
- The second package, called "Zelig". Just enter: install.packages("Zelig")
- The third package, called "Design". Just enter: install.packages("Design")
- The fourth package, called "optmatch". Just enter: install.packages("optmatch")
Note: You will need Internet access in order to install all of the add-on packages for R.
We also have a couple of brief videos to help you with the installation process:
R for Mac FAQ: http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html