DOI: 10.7910/dvn/sggsbo
title: Replication Data for "Risky Transportation Choices and the Value of Statistical Life"

description: This paper exploits an unusual transportation setting to generate some of the first
revealed preference value of a statistical life (VSL) estimates from a low-income
setting. We estimate the trade-offs individuals are willing to make between mortality
risk and cost as they travel to and from the international airport in Sierra Leone. The
setting and original dataset allow us to address some typical omitted variable
concerns, and also to compare VSL estimates for travelers from different countries,
all facing the same choice situation. The average VSL estimate for African travelers
in the sample is US$577,000 compared to US$924,000 for non-Africans.
description: Readme file to replicate tables and graphs in:
Leon and Miguel (2017) “Risky Transportation Choices and the Value of Statistical Life,” American Economic Journal: Applied Economics, Vol. 9(1): 202-228

The descriptive statistics, graphs, and conditional logit regressions were computed using stata, while all the mixed logit estimation was done using MATLAB, thus the replication files are grouped into two separate folders:
• Stata Replication
• MATLAB Replication

All the individual level information contained in the datasets comes from the survey applied in Freetown and Lungi in August and September 2012. The original questionnaire is in the replication files (Survey_Transp_Choices_General_2012FF.pdf)

To be able to replicate the results from the paper, you need to paste these two folders in your computer and change the path in the stata do file called: “TablesVSLReplication-20160615.do” This do-file contains specific instructions and pulls up the data sets necessary to replicate the indicated tables. Likewise, in this do-file, you will find details on which are the tables that were computed using MATLAB and the exact .m files that you need to run to replicate these results.

The folder “Replication STATA” contains the following files:
• TablesVSLReplication-20160615.do : Do file that generates all the descriptive statistics and graphs in the paper, with the exception of the mixed logit estimations. 
• Transp-Regressions.dta: Dataset at the passengerXChoice Situation level, used to run conditional logit regressions, as well as to generate descriptive statistics of the choice situations.
• Transp-wide-final-Replication.dta: Dataset at the passenger level, used to generate tables that describe passenger characteristics and their choices.
• Trans_VSLEstimates.dta: Dataset containing the individual level VSL estimates from the mixed logit regressions, used to generate the correlates of the VSL in Table 6.

The MATLAB files are completely automatized, and were written based on the code provided by prof. Kenneth Train (publicly available at: http://eml.berkeley.edu/Software/abstracts/train1006mxlmsl.html). For these files to run, you need to copy to your computer all the files included in corresponding folder. To replicate the results, you just need to run the files named with the format “mixed_logit_RestTriang_20160620_XXX.m” In there, you need to un-comment the lines corresponding to the regressions you want to replicate (start in row 45 in all the files). After you have done that, the code will pick a sample, pull out the data set, and estimate the choice model. More precisely, the files in the folder “Replication MATLAB” contain the following files:

The main files that run the different regressions in the paper are the following:

• mixed_logit_RestTriang_20160620_T4_1.m
• mixed_logit_RestTriang_20160620_T4_2.m
• mixed_logit_RestTriang_20160620_T5_1.m
• mixed_logit_RestTriang_20160620_T5_2.m
• mixed_logit_RestTriang_20160620_TA4.m

These files call a set of ancillary files used for the estimation. Paraphrasing prof. Train’s readme file (downloaded from: http://eml.berkeley.edu/Software/abstracts/train1006mxlmsl.html): 

• doit.m is a script (not a function) that is called at the end of mxlmsl.m. It checks the data, transforms the data into a more useful form, performs the estimation and prints results. It calls all the other functions either directly or indirectly.
• check.m is a function that checks the input data and specifications. It provides error messages and terminates the run if anything is found to be incorrect.
• loglik.m is a function that calculates the log-likehood function and its gradient. This funtion is input to Matlab's fminunc command (which is part of Matlab's Optimization Toolbox.) This function calls llgrad2.m.
• llgrad2.m is a function that calculates for each person the probability of the chosen alternatives and the gradient of the log of this probability. 
• der.m is a function that calculates the derivative of each random coefficient with respect to the parameters of the model.
• makedraws.m is a function that creates the standardized (ie parameter-free) draws that will be used in the run, based on the specifications given by the user in mxlmsl.m. 
• trans.m is a function that transforms the standardized draws into draws of coefficients. (EG, if coefficient c is normal with mean b and standard error w, then makedraws.m creates draws mu from a standard normal N(0,1), and trans.m creates the draws of coefficients as c=b+w*mu.)
• condmn.m generates the individual level parameters
• trirnd.m is a command that generates the restricted triangular distribution for the estimation of the model.

The following .csv files contain subsets of the main dataset used in the different regressions in the paper (the details are specified in the main .m files described above):
• Data2012_2006.csv
• Data2012_2007.csv
• Data2012_2008.csv
• Data2012_2009.csv
• Data2012_2010.csv
• Data2012_2011.csv
• Data2012_af.csv
• Data2012_afnosl.csv
• Data2012_all.csv
• Data2012_noaccidents.csv
• Data2012_noaf.csv
• Data2012_nofirst.csv
• Data2012_paid.csv
• Data2012_sl.csv

The following .m files call the datasets for each of the subsamples used in each regression and define the matrix sizes (specific details are provided in the main .m files describe above):
• sample2012af.m
• sample2012afnosl.m
• sample2012all.m
• sample2012noaccident.m
• sample2012noaf.m
• sample2012nofirst.m
• sample2012paid.m
• sample2012sl.m
• sample20122006.m
• sample20122007.m
• sample20122008.m
• sample20122009.m
• sample20122010.m
• sample20122011.m

Any comments or questions related to these replication files can be directed to Gianmarco Leon at Gianmarco.leon@upf.edu