This document describes how to replicate the results of the paper ?The Labor Market Effects of Reducing the Number of Illegal Immigrants.? Authors: Andri Chassamboulli and Giovanni Peri, Accepted for publication by the review of Economic Dynamics 24 July 2015 There are 5 codes, all written in matlab: Results_Benchmark.m Prepare_Figures.m Prepare_Tables.m Policy_Combination.m Prod_Difference.m To replicate the results in the benchmark model (shown in columns 1-8 of Table 2, Figures 1-3 in the main text and Figure 1A in the Appendix) and the robustness checks (reported in Tables 3-6 in the main text and Tables A1-A5 in the Appendix) use the code Results_Benchmark.m. To replicate the results in the Benchmark model you should run this code 4 times --once for each policy change: border control, higher search cost, deportation, legalization. For instance, to produce the results of increased border control using the baseline parameterisation (columns 1-2 of Table 2) first, make sure that the baseline parameter values are ?uncommented? while those used for robustness checks are ?commented?. Second, make sure that you are changing the appropriate policy parameter: in lines 508 to 513 comment all other policy changes and make sure that you uncomment border control (mui=mui*(1-X)). Finally, save the results in mui100_baseline: in lines 580 to 584 makes sure that only ?save mui100_baseline? is uncommented. After running the code 4 times and saving the results, you can then use the codes: Prepare_Figures and Prepare_Tables to produce the Figures and Tables. By using the same code and following the same procedure you can replicate the robustness checks by adjusting the relevant parameter or target value. Again, for each robustness check, the code must be run 4 times, one for each policy change, and each time the results should be saved using a different file name. The code Policy_Combination.m replicates the results shown in the last two columns of Table 2. Please see the paper for details. The code Prod_Difference.m can be used to replicate the results shown in Table 7. Again, run this code 4 times (once for each policy change). Each time, remember to uncomment the appropriate policy change (see lines 391 to 395). After running the code 4 times and saving the results, the last part of the code can be used to produce Table 7.