This document explains how to setup a computer to follow the Statistical Reasoning and Quantitative Methods (SRQM) course run at Sciences Po by François Briatte and Ivaylo Petev.
Every student gets a copy of this ‘Teaching Pack’ on the first session, and gets assigned to read this file and setup their machines as a warm-up exercise to the course.
The course requires a working copy of Stata 12, by StataCorp. Minimal system requirements are Mac OS X 10.5 or Windows XP.
Backward compatibility extends back to Stata 10, which means that the course do-files should be able to run after a few adjustments on older operating systems.
The following steps explain how to configure a system to work with Stata for the duration of this course.
Move the whole ‘Teaching Pack’ to a stable and easily accessible location on your hard drive, preferrably with your other courses in your
You can rename the ‘Teaching Pack’ folder to whatever you like, but you will have to use its new name in replacement of
SRQM in the following instructions.
Stata should be pre-installed on your workstation.
Make sure that you are running Stata from the "Applications" folder or its system equivalent, such as "Program Files" on Windows. Running Stata from outside your application folder might cripple the software in several respects.
Now, open Stata. To set the
SRQM folder as the working directory, use the File > Change Working Directory… menu item, or type ⌘⇧J (Command-Shift-J) on Mac OS X.
Watch the folder path that Stata will display in the ‘Results’ window when you select the SRQM folder:
. cd "/Users/fr/Documents/Teaching/SRQM" /Users/fr/Documents/Teaching/SRQM
The folder path will look different on your local system, especially on Windows, which uses backslashes:
. cd "C:\Users\Ivo\Documents\Teaching\SRQM" C:\Users\Ivo\Documents\Teaching\SRQM
This folder path will be used to access the course material throughout the semester. If you modify the name and/or the location of the
SRQM folder during that period, you will need to run through this installation guide again to update your settings.
profile.do file in Stata, using the File > Open… menu item, or type ⌘O (Command-O) on Mac OS X, or type Ctrl-O on Windows. Select “All Stata Files” or “Do-file (*.do)” where asked what file format to show.
Stata will open the
profile.do file in its do-file editor. At the top of the code, at lines 10-11, replace the folder path in quotes by your own folder path to the
// Edit this command to reflect your local path to the SRQM folder: cap cd "~/Documents/Teaching/SRQM"
Save the modified file using the File > Save item, or type ⌘S (Command-S) on Mac OS X, or type Ctrl-S on Windows. Then quit Stata when you are done.
Open Stata again. Your
profile.do file should guide it to the
SRQM folder, in which case Stata will say “Welcome” among a few other things:
Welcome. You are running Stata with the SRQM profile. Working directory: /Users/fr/Documents/Teaching/SRQM Course/ README.md Replication/ Datasets/ README.pdf profile.do ...
If Stata says something else that looks like an error, the most probable cause is that there is a mistake in your folder path, in which case you need to restart this installation guide from Step 3.
You will also get an error message if you modify the names and/or the locations of the
srqm setup in the Command window and press
Enter to run the setup program for this course. The
srqm setup command is part of a program that will silently load when you open Stata with this configuration. This configuration makes sure that you can run all course do-files.
The program needs to download a few additional packages, so make sure that you are online when running it. If you are not connected to the Internet, as when you get logged off the Sciences Po wifi network, Stata installation commands will systematically fail.
Please ask for help as early as possible, so that we can put configuration issues behind us and move to the actual course. Most issues can be covered in a matter of minutes if your computer is not experiencing a more serious issue.
If you do not have access to hard drive space to perform the above installation, the ‘Teaching Pack’ should be able to run from a USB key plugged to a Sciences Po workstation. This requires the ‘Teaching Pack’ folder to be located at
e:\SRQM(where your USB key should have loaded). Additional packages will be temporarily installed at location
c:\tempon your hard drive.
If you cannot setup Stata and install additional packages, you will run into errors in the course do-files when we use non-native, user-coded Stata commands. This can sometimes be circumvented, e.g. by replacing all
tabcommands. You will also need to minimally configure Stata by hand, starting with the working directory (and memory if running Stata 11 or older).
When you are done, you should:
- turn to the README file of the
Coursefolder, to learn about the course material.
- turn to the README file of the
Datasetsfolder, to learn about the data sources we will use.
Welcome to SRQM, and see you soon!