Title of the paper : “Wage Dynamics and Peer Referrals”. Manuscript number : RED_2018_6_R2 Authors : Vincent Boucher and Marion Goussé RED editor in charge : Vincenzo Quadrini This file contains instructions to reproduce the results in the paper “Wage Dynamics and Peer Referrals”. by Vincent Boucher and Marion Goussé and edited in Review of Economic Dynamics. if experiencing problems making any of these programs work properly, contact Marion Goussé (marion.gousse@ecn.ulaval.ca). We use the Matlab and Stata softwares to produce our results. We describe in the following seven sections the several steps to obtain our samples, to estimate the structural parameters and run our counterfactual simulations. We also explain how to replicate the tables and figures in the paper. I. Source data All empirical results in the paper are based on the 18 waves of the British Household Panel Survey (BHPS), ranging from 1991 to 2008. We use - the 18 individual files aindresp (wave 1), bindresp (wave 2), ..., rindresp (wave 18) - the 18 job historic files ajobhist (wave 1), ..., rjobhist (wave 18) to get the variable "jhstpy" : reason for stopping previous job. - the 18 ttwa file attwa_protect (wave 1), ..., rttwa_protect (wave 18) which give the Travel To Work Area of each individual by wave. BHPS data can be obtained from the UK Data Service. To obtain the data we are using, you need to obtain permission from the UK Data Service to use the unrestricted version of the BHPS (more details in https://www.iser.essex.ac.uk/bhps/acquiring-the-data). Besides, the 18 ttwa files giving the TTWA of individuals are particularly protected and provided on conditional access (attwa_protect.dta, ..., rttwa_protect.dta). In this replication file, we provide an html file (UKDA_Study_6031_information.htm) which links toward the website where you need to register and get the authorization to obtain these data. II. Preparation of our samples with Stata (Computation time : about 10mn) Using these .dta source files, we produces 6 .raw files that we use for estimation in Matlab. We provide these .raw files. - 2 files for our main samples, one for men (networkH.raw), on for women (networkF.raw). - 2 files for our main samples on non-movers, one for men (networkH_non_movers.raw), on for women (networkF_non_movers.raw). - 2 files for our main samples using the local unemployment rate by ttwa, one for men (networkH_loc_Urate.raw), on for women (networkF_loc_Urate.raw). We produce these 6 files using the following Stata program - BHPS_jobs.do This Stata program also use three external data tables that we obtain from external sources than the BHPS. - a Stata table containing the Consumer Price Index from 1991 to 2008 (cpi.dta). - a Stata table containing the Unemployment rate in the 12 UK regions from 1991 to 2008 (rateUK.dta). - a Stata tables containing for each TTWA, the average hourly_rate for men from 2000 to 2006 (hourly_pay_ttwa.dta) We computed this last table using archives data for the year 2000 to 2006 from (https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/workbasedtraveltoworkareaashetable11) We do not provide this last table as it links the average hourly_rate to the TTWA and would allow the user without authorization to recover individuals' ttwa and eventually individuals' identity. We would be pleased to provide this table on user's request if he obtained the authorization from the UK data service. III. Descriptive Statistics with Stata The last section of the do-file "BHPS_job.do" gives the code to produce the table 3, 4 et 5 of the paper. IV. Descriptive Statistics with Matlab - BHPS_estimation.m produces Figure 4 and Tables 1 and 2 of the paper from the .raw files produced above and that we provide. V. Estimation with Matlab (Computation time : about 40mn per estimation.) - BHPS_estimation.m also performs the parameters estimation of the model. At the beginning of this programm, the user has to choose the sample on which he wants to run the estimation: By choosing the main samples (men or women), we would obtain the estimates for table 6 (women) or 7 (men). By choosing the samples with non-ttwa movers, we would obtain the estimates displayed in table 3 (women) and 4 (men) of online appendix. By choosing the sample using the local ttwa unemployment rate computed within the sample, we would obtain the estimates of table 5 (women) and 6 (men) of online appendix. This programs use loglikelihood functions which are written in two auxiliary files - LV_net_BHPSF_joint.m for estimation of the main model. (Resulting parameters are displayed in Table 6 and in Table 7). - LV_net_BHPSF_joint_friendtype.m for estimation of the auxiliary model with additional parameters for special type of friends (resulting parameters are displayed in Table 8 and 9) Parameters are exported in tex.file using two auxiliary files (one for parameters, the other for standard errors) : matrix2latex.m and matrix2latexStd.m The last section called "Friendypes" codes a loop to run the estimation by changing at each iteration the particular type of friends for which we want to estimate the additional effect (resulting parameters are displayed in Table 8 and 9). Each iteration lasts around 40mn. VI. Robustness checks. Robustness checks presented in appendix are also computed using the program BHPS_estimation.m At the beginning of the program BHPS_estimation.m, we can choose to restrict the sample on three different ways - On low educated individuals and obtain results for table 8 of the paper, - On individuals with only far away friends (table 1 and 2 of online appendix), - On individuals with only long lasting friends (table 7 and 8 of online appendix)). The section written from line 200 to line 230 computes the clustered standard errors by TTWA when we use the particular sample of non-ttwa movers. Resulting parameters are displayed in table 3 and 4 of online appendix. VII. Simulation with Matlab (Computation time : about 5mn.) The following Matlab file perform simulations of the model and counterfactual experiments which produce figure 5 and 6 of the paper and Table 11. - BHPS_Desc.m At the beginning of the program, the individual may choose the sample (networkF.raw or networkH.raw) for which he wants to perform counterfactuals.