|
| 1 | + |
| 2 | + ___ ____ ____ ____ ____ (R) |
| 3 | + /__ / ____/ / ____/ |
| 4 | +___/ / /___/ / /___/ 13.1 Copyright 1985-2013 StataCorp LP |
| 5 | + Statistics/Data Analysis StataCorp |
| 6 | + 4905 Lakeway Drive |
| 7 | + Special Edition College Station, Texas 77845 USA |
| 8 | + 800-STATA-PC http://www.stata.com |
| 9 | + 979-696-4600 stata@stata.com |
| 10 | + 979-696-4601 (fax) |
| 11 | + |
| 12 | +6-user Stata network perpetual license: |
| 13 | + Serial number: 501306214221 |
| 14 | + Licensed to: Miklos Koren |
| 15 | + Central European University |
| 16 | + |
| 17 | +Notes: |
| 18 | + 1. (-v# option or -set maxvar-) 5000 maximum variables |
| 19 | + 2. Command line editing disabled |
| 20 | + 3. Stata running in batch mode |
| 21 | + |
| 22 | +Note: Your site can add messages to the introduction by editing the file |
| 23 | + stata.msg in the directory where Stata is installed. |
| 24 | + |
| 25 | +. do code/02_download_data.do |
| 26 | + |
| 27 | +. /* |
| 28 | +> The programs and data files replicate the descriptive statistics and the esti |
| 29 | +> mation results in the paper |
| 30 | +> |
| 31 | +> Hornok, Cec�lia and Mikl�s Koren, forthcoming. �Per-Shipment Costs an |
| 32 | +> d the Lumpiness of International Trade.� Review of Economics and Statistics. |
| 33 | +> |
| 34 | +> Please cite the above paper when using these programs. |
| 35 | +> |
| 36 | +> For your convenience, we reproduce some of the data resources here. Although |
| 37 | +> all of these are widely available macroeconomic data, please check with the d |
| 38 | +> ata vendors whether you have the right to use them. |
| 39 | +> |
| 40 | +> Our software and data are provided AS IS, and we assume no liability for thei |
| 41 | +> r use or misuse. |
| 42 | +> |
| 43 | +> If you have any questions about replication, please contact Mikl�s Koren at k |
| 44 | +> orenm@ceu.hu. |
| 45 | +> */ |
| 46 | +. |
| 47 | +. *** Downloads all data from the available internet resources and saves them t |
| 48 | +> o the folder data/. This script uses a Unix shell, so requires Unix, Linux or |
| 49 | +> Mac OS X. If you are running Windows, check how to use zip and gzip from the |
| 50 | +> command line. We have saved the output of this script in data/ for your conv |
| 51 | +> enience, so you can skip the downloads. |
| 52 | +. |
| 53 | +. set more off |
| 54 | + |
| 55 | +. |
| 56 | +. * unzip Census trade data |
| 57 | +. shell gunzip -r data/census/trade |
| 58 | + |
| 59 | + |
| 60 | +. |
| 61 | +. * read unilateral vars from CEPII |
| 62 | +. copy "http://www.cepii.fr/distance/geo_cepii.dta" data/cepii/geo_cepii.dta, r |
| 63 | +> eplace |
| 64 | + |
| 65 | +. |
| 66 | +. * read bilateral vars from CEPII |
| 67 | +. copy "http://www.cepii.fr/distance/dist_cepii.dta" data/cepii/dist_cepii.dta, |
| 68 | +> replace |
| 69 | + |
| 70 | +. |
| 71 | +. * read census numerical codes |
| 72 | +. copy "http://www.census.gov/foreign-trade/schedules/c/country.txt" data/censu |
| 73 | +> s/country.txt, replace text |
| 74 | + |
| 75 | +. |
| 76 | +. * indicators from World Bank Data API |
| 77 | +. foreach indicator in ny.gdp.pcap.cd ny.gdp.mktp.cd ic.exp.cost.imp ic.exp.tim |
| 78 | +> e.imp { |
| 79 | + 2. capture wbopendata, indicator(`indicator') year(2009) clear long |
| 80 | + 3. saveold data/worldbank/`indicator'.dta, replace |
0 commit comments