********************* Paper title: A Directed Search Model of Crowding Out Author: Yu CHEN ********************* List of attached files: 1. RCode_Figures 2 and 3.R 2. RCode_Table 2.R 3. main data.RData 4. RCode NLSY.R 5. NLSY.dat 6. task.raw 7. weight.dat 8. Readme.txt ********************* Software used: R version 4.0.0, RStudio Version 1.3.959 Operation system: macOS Catalina Version 10.15.7 Total Expected computation time: 7-15 mins ********************* The codes and data files are organized as follows: 1. 'RCode_Figures 2 and 3.R' generate two figures (Figure 2 and Figure 3) in the manuscript. 2. 'RCode_Table 2.R' contains R code that analyzing data 'main data.RData' and generates results listed in Table 2. 3. 'RCode NLSY.R' contains R code that cleans raw data ('NLSY.dat', 'tast.raw', 'weight.dat') and generates the dataset file 'main data.RData' 4. 'Readme.txt' contains related information and instructions. ********************* To generate Figure 2 and Figure 3: 1. Run/source code 'RCode_Figures 2 and 3.R' in R/Rstudio. Two plots will be generated in the order of Figure 2 and Figure 3. * NOTE: Code file 'RCode_Figures 2 and 3.R' contains two parts. Part 1 defines all the functions used for solving and calculating equilibrium and non-equilibrium allocations. Part 2 simulates the model with parameter values stated under footnote 13 in the manuscript. ********************* To generate Table 2: 1. Put the code 'RCode_Table 2.R' and data 'main data.RData' under the same folder. Set this folder location as Working Directory in R/Rstudio. 2. Run/source code. The results correspond to the four values in Table 2. * NOTE: the code will first load 'main data.RData', which contains four variables (categories, main_data, Task, weight). The construction of 'main data.RData' is described below. ********************* To construct the final data file ''main data.RData' from raw data: 1. Put the code file 'RCode NLSY.R' and data files ('NLSY.dat', 'task.raw', 'weight.dat') under the same folder. Set this folder location as Working Directory in R/Rstudio. 2. Run/source code. The cleaned dataset will be saved as an RData file 'main data.' * NOTE: Data file 'NLSY.dat' and 'weight.dat' are downloaded from the NLSY website. The code in 'RCode NLSY.R' that cleans the NLSY data and weight is also obtained from the NLSY website. * NOTE: Data file 'task.raw' and the code cleans this data are obtained from the supplemental material of Yamaguchi (2012), downloaded from the Journal of Labor Economics website.