This file is a set of instructions on how to reproduce the results of the paper "Divergence without decoupling: Male and female life expectancy usually co-move", by Noymer & Van, in Demographic Research. This file has two parts. First, a catalog of files. Second, a set of instructions. FIRST PART: (alphabetical order) FILENAME WHAT IT DOES ---------------------------------------------------------------------------------------------------- congruence_analysis_25year_v01.do Table 3, column 6 analysis congruence_analysis_v01.do Table 3, column 3 analysis e0_per.zip Raw data (from HMD) fix-belgium.sh Data management for missing data, Belgium france_data_to_pre-pend A few years of French data (non-HMD) goodman_grunfeld.pro IDL subroutine prep_data_for_congruence_analysis_25year.sh data prep for Table 3, column 6 analysis prep_data_for_congruence_analysis.sh data prep for Table 3, column 3 analysis readme.txt this file rename_hmd_ii.sh data prep for main analysis rename_hmd.sh data prep for main analysis rough-process-hmd.sh data prep for main analysis run_gg_v010.pro IDL program for main analysis whitespace_to_comma.awk dependency for prep_data_for_congruence_analysis.sh SECOND PART: ------------------------------------------------------------------------ (0) THE RAW DATA: We downloaded e0_per.zip from http://www.mortality.org/cgi-bin/hmd/hmd_download.php This file, as we downloaded it, is provided. Replicators wishing to freshen as well as replicate the analysis should get the latest HMD file fromt the above link. (The E0per_1x10 and E0per_1x5 files in the HMD zip archive are NOT used and should be deleted to avoid confusion.) (1) Some file renaming and data preparation. For backwards compatibility with some files in our own research programme, we re-name the HMD files. This is a re-name, only, and does not change any data. We also strip the non-data lines from the HMD files. And we pre-pend the number of lines of data to each file (this will be used below). Those tasks (rename, strip non-needed data, etc) are accomplished with a series of bash scripts (described below); bash is an open-source scripting language. We stress: for those not willing or able to execute these bash scripts, what these files accomplish is self-explanatory upon inspection of the scripts, and can be achived by other means. (For those unfamiliar, the scripts themselves are ASCII text files.) First deal with a special case, early French data: the file: "france_data_to_pre-pend" is provided. It is an ASCII text file. Please refer to the paper for the origin of this file. Manually paste the France add'l data onto the top of the France HMD data file. (the HMD file is called FRATNP.E0per.txt) In a directory containing the unzipped contents of e0_per.zip (cf. 0), execute the following bash scripts (all provided) in the following order: sh rename_hmd.sh sh rough-process-hmd.sh sh fix-belgium.sh sh rename_hmd_ii.sh Basically what this does is (i) removes non-data lines from the HMD files; (ii) pre-pends a number-of-lines count to the data-only files; (iii) renames the files. It also treats a special case of Belgium, which is the only country with missing data. (2) The next steps are done in the IDL language. More information about IDL may be found here: http://www.exelisvis.com/ProductsServices/IDL.aspx IDL programs are ASCII text files and these may be used as pseudocode for porting to another language. The syntax and control structures are very straight-forward. run_gg_v010.pro is the IDL program that conducts the analysis and goodman_grunfeld.pro is a subroutine. These files accomplish all of the analysis and output of the paper, with the exception of one small thing, done in STATA, described below. (The G-G test statistics are normally-distributed and may be converted to p-values using any statistical software, e.g. in Stata: 1-normprob(GG_test_stat), but the pro file does not do this directly.) (3) The "proportion congruent" analysis in table 3 was done in bash and Stata: (i) in bash: sh prep_data_for_congruence_analysis.sh (ii) in Stata: congruence_analysis_v01.do (iii) in bash: prep_data_for_congruence_analysis_25year.sh (iv) in Stata: congruence_analysis_25year_v01.do the above bash scripts have the file (provided), whitespace_to_comma.awk, as a dependency