ReadMe file for Data Files and Programs Used in Paper “Estimating Mobility Rates in Search Models with Initial Condition Problems” Gadi Barlevy and H. N. Nagaraja This file describes the final datasets used to report the results in the paper “Estimating Mobility Rates in Search Models with Initial Condition Problems” and the programs used to generate the results. I begin with a description of the construction of the database from the original NLSY work history files from which all data included was drawn. I then describe the data files and programs needed to replicate each of the tables and figures in the paper. 1. Description of construction of database from the NLSY Work History The original NLSY work history dataset asks each person in the NLSY (identified by IDNUM) on up to 5 jobs each year (each job is assigned a number, entitled JOBNUM). Jobs are linked across interview years with a variable entitled PREV that says which of the jobs (1-5) in the previous year it corresponds to. From the original NLSY work history database, I create a new database (filename JOB_REDONE.DBF, which is not included as one of the files). The program that created this database from the original NLSY data was written in SQL for Microsoft Visual Foxpro. This program creates an entry in JOB_REDONE for each job-year reported in the original NLSY work history data. For each entry, I record the first week and last week the worker reported spending in this job since the previous interview. Additional data was added from other files downloaded from the NLSY that had the same format. This includes the variable PREV that links jobs across years. Using links to previous jobs, I assign a distinct job identification number for each job (the variable is entitled JOBID). The resulting database, JOBS_REDONE, contains 110,767 records, i.e. job-year observations. In 204 of these records, the last week the worker reports occurs BEFORE the first week he reports. In these cases, the two dates were swapped (in most cases, the startdate and stopdate were one week apart). The starting and ending week for each job (ACTSTART and ACTSTOP) were assigned as the minimum and maximum weeks reported for each job, respectively. Missing observations were assigned a value of -3. Once starting and ending weeks are assigned, we can identify second jobs as those that begin after another job starts and end before that same job ends. There are 98,971 such job-year records. Fields in JOBS_REDONE.DBF (one for each job-year pair): 1.IDNUM – Individual person identifier (unique per person) 2.JOBID – Individual job identifier (unique per job) 3.JOBNUM – Job number assigned by person to the jobs he reports on in a given interview (1-5) 4.STARTWEEK – Week individual reports first working on job since last interview 5.STOPWEEK – Week individual reports last working on job 6.INTWEEK – Week individual was interviewed regarding job in that year 7.ACTSTART – First week individual ever reports working on job in any interview NOTES: If STARTWEEK > STOPWEEK, we set ACTSTART = Min(STARTWEEK,STOPWEEK), excluding zero and negative values. If STARTWEEK = 0, it is treated as missing and ACTSTART is set to -3. 8.ACTSTOP – Last week individual ever reports working on job in any interview (set to -3 if missing). NOTES: If STARTWEEK > STOPWEEK and STOPWEEK is the last date reported for the job, ACTSTOP is set equal to STARTWEEK. 9.INVOL – Variable equal to 1 if job change was reported as involuntary (based on WHYLEFT) 10.VOL – Variable equal to 1 if job change was reported as voluntary (based on WHYLEFT) 11.IND – 3 digit industry code 12.OCCUP – 3-digit occupation code 13.YEAR – Year of interview 14.SECNDJOB – Variable equal to 1 if job starts after and ends before another job 15.WHYLEFT – Reason for leaving, based on a coding scheme (NOTE: coding changes across years) 16.PREV –value of JOBNUM for same job in previous interview 17.BIRTHYEAR – Year in which respondent was born (by construction of sample, all born in 1900s) 18.AGE – Age of the respondent in interview year 19.EDUC – Highest grade ever completed by the respondent 20.POTEXP – Potential experience in each year, i.e. the maximum between 0 and the age of the respondent minus EDUC minus 6. The 98,971 job-year records for non-secondary jobs were sorted according to idnum / startweek / stopweek / year. Each job could then be assigned a variable (called INVOL_WKS) that is equal to 1 for each job where if the worker spent at least one week after the job ended non-employed, 2 if the worker moved to a job that he started no later than one week after his previous job ended, and 3 if we do not know what the worker did after the job ended (the job was censored or missing a stop date, or the next job was missing a start date). We could also assign n, the position of the job within its respective employment cycle, to each job (equal to 1 if the previous job has an INVOL_WKS set to 1, or n+1 if the previous has INVOL_WKS = 2 and a position of n). Job and cycle tenure were aggregated into 13 week periods so that the analysis could be done on a quarterly basis, i.e. TENURETOT = FLOOR((ACTSTOP – ACTSTART - .001)/13 ) + 1. Similarly, we can compute the tenure of an entire cycle (i.e. time between two consecutive unemployment spells). The additional fields created based on duration data and the position in the cycle n are as follows: 1.INVOL_WKS - An indicator that equals 1 if worker starts next job more than 1 week after previous job ended, 2 if he starts job within 1 week of when his previous job ended, 3 if we don’t know what happened (no subsequent job reported, dates missing), and 4 if we don’t know what happened and the job is essentially secondary NOTES: Value is assigned only in the LAST year a job is reported, i.e. there is at most one value for each job. Counting these will thus give a unique count by jobs. 2.N_1_WKS – Job number in current employment cycle. NOTES: Variable is assigned to a job in each year on which it is reported. Hence, one cannot generate a count of jobs by counting this variable without first ensuring a unique observation per each jobid. 3.TENURETOT – Total number of weeks between ACTSTART and ACTSTOP where both are available. Value assigned only where INVOL_WKS, ACTSTART, and ACTSTOP are positive. NOTES: Variable is assigned only once to each job, so counts will be accurate. This variable is equal to completed tenure only where INVOL_WKS = 1 or 2. If INVOL_WKS = 3, it reflects a lower bound on completed tenure. 4.TENUREAG13 – Total number of quarters between ACTSTART and ACTSTOP when both are available, i.e. number of weeks divided by 13 (note: first quarter includes fourteen weeks, 0-13). 5.WKCYCBEGWK – Week the employment cycle job belongs to began, where classification is based on N_1_WKS. As with N_1_WKS, it is reported each year for any job. 6.WKCYCENDWK – Week the employment cycle job belongs to ended, where classification is based on N_1_WKS. As with N_1_WKS, it is reported each year for any job. 7.CYCDURAG13 – Total number of quarters between WKCYCBEGWK and WKCYCENDWK, i.e. 13-week periods (except for first quarter. As with N_1_ WKS, it is reported for each year for any job). Note: this is identical to CYCTENAG13, but the latter is only reported when the cycle ends, while CYCDURAG13 is reported each year for any job in the cycle. 8.CYCCENSOR – Variable that is equal to 1 if last job in the cycle ends and is followed by at least one week of unemployment, and equal to 3 if not known what happens after last job in cycle. 9.CYCLASTN – The value of N_1_WKS for the last job in the employment cycle. 10.CYCTENURE - Total number of weeks between WKCYCBEGWK and ACTSTOP where both are available. Value assigned only where INVOL_WKS = 1 (cycle ended) or 3 (cycle censored). NOTES: Variable is assigned only once to each cycle, so count would reflect count by cycles. 11.CYCTENAG13 – CYCTENURE divided by 13 (i.e. length of cycle in quarters) 12.MAXINTWEEK – Last week in which the person was interviewed 13.JOBCYCCEN – A variable equal to the duration of the job * 1000 + the duration of the cycle * 10 plus a number equal to 1 or 3 depending on whether the cycle was censored or not. NOTES: Variable is used to generate counts that are subsequently used to compute standard errors. 14.WINDOWLEFT – Number of weeks from when job started to last week the person was interviewed. 15.CENSORED – a dummy variable that is equal to 1 if the duration of the job is right censored, i.e. if either ACTSTOP is missing or ACTSTOP = INTWEEK and there are no subsequent observations. This variable is assigned once for each job. 2. Instructions for Replicating Figures, Tables, and claims made in the paper All figures and tables use data extracted from the database whose construction is described above. Figure 1: Hazard for Job Ending The data used to construct the figures are taken from the ASCII comma delimited files jobtenure.txt and jobcensored.txt that were made available to the Review of Economic Dynamics. A description of the two files is contained further below in this documentation. The hazard rate after q quarters is equal to the fraction of jobs that are censored at q quarters divided by the number of jobs that last at least q-1 quarters. Figure 2: Predicted distribution of N The data used to construct Figure 2 (series = “data”) are taken from the ASCII comma delimited file ncount.txt that was made available to the Review of Economic Dynamics. A description of this file is contained further below in this documentation. The two predicted distributions were generated by evaluating the MATLAB function recnumlikelihood.m that was made available to the Review of Economic Dynamics. The series “predicted – constrained” was generated by evaluating the function at the vector [a b k] = [1 1 1.127]. The series “predicted – unconstrained” was generated by evaluating the function at the vector [a b k] = [.165 .031 8.354], corresponding to the estimates in Table 3. The implied distribution is reported as P in that function. Table 1: Estimates based on duration Estimates in Table 1 were produced in MATLAB by minimizing the negative of the log likelihood, specifically the command fminsearch(‘function’, vector of initial conditions) where ‘function’ refers to the relevant negative log likelihood function of interest (to be detailed below) To estimate , the relevant function is durationlikelihood.m. Running fminsearch will yield the maximum likelihood estimate for , and the variable asympse computed in the program corresponds to the asymptotic standard error for the coefficient. The data files used in the estimation are described at the beginning of durationlikelihood.m. To call the relevant files, other files must be commented out (the path to call these files may need to be altered). The relevant files are called in pairs as follows: cyctenure.txt, cyccensored.txt – to estimate for all workers cyctenuredropout.txt, cyccensoreddropout.txt – to estimate for dropouts only cyctenurehs.txt, cyccensoredhs.txt – to estimate for high school grads only cyctenuresomecoll.txt, cyccensoredsomecoll.txt – to estimate for those with some college only cyctenurecollege.txt, cyccensoredcollege.txt – to estimate for college grads only The above data files are described at the end of this document. To estimate a,b, and k, the relevant function is hecksinglikelihood.m. This file in turn invokes two other functions, which the program assumes are in the same directory as hecksinglikelihood.m: hexp.m – function equal to likelihood of duration for given u (integrate hexp over u [0,1] to get likelihood of a given duration time) betadistcensored.m – function equal to likelihood of censored duration for given u (integrate betadistcensored over u [0,1] to get likelihood of a given censoring time) Running fminsearch will yield the maximum likelihood estimate for [a b k]. The data files used in the estimation are described at the beginning of hecksinglikelihood.m. To call the relevant files, other files must be commented out (the path to call these files may need to be altered). The relevant files are called in pairs as follows: jobtenure.txt, jobcensored.txt – to estimate for all workers jobtenuredropout.txt, jobcensoreddropout.txt – to estimate for dropouts only jobtenurehs.txt, jobcensoredhs.txt – to estimate for high school grads only jobtenuresomecoll.txt, jobcensoredsomecoll.txt – to estimate for those with some college only jobtenurecollege.txt, jobcensoredcollege.txt – to estimate for college grads only In addition, one must set  equal to the value estimated in the first stage for the relevant group. These valued are reported in the program, and irrelevant values must be commented out. Standard errors for a,b, and k are computed by evaluating a particular function at values of the coefficients. These standard errors incorporate a correction based on Murphy and Topel (1985) to account for the fact that  is estimated. One must set  equal to the value estimated in the first stage for the relevant group. These valued are reported in the program, and irrelevant values must be commented out. The functions the compute standard errors are as follows: hecksinglikelihoodse1.m to evaluate the standard error for k when we restrict a= b= 1 hecksinglikelihoodse.m for general case to evaluate the standard error for a, b, and k These two files call of various data files for their computations. To call the relevant files, other files must be commented out (the path to call these files may need to be altered). jobtenure.txt, jobcensored.txt, jobcyccen.txt jobtenuredropout.txt, jobcensoreddropout.txt, jobcyccendroput.txt jobtenurehs.txt, jobcensoredhs.txt, jobcyccenhs.txt jobtenuresomecoll.txt, jobcensoredsomecoll.txt, jobcyccensomecoll.txt jobtenurecollege.txt, jobcensoredcollege.txt, jobccycencollege.txt Finally, the LR statistic in Table 1 is equal to 2*ln(Lc/L) where Lc is the constrained likelihood where we set a = b = 1, and L is the unconstrained likelihood. These likelihood just correspond to the values of the function hecksinglikelihood evaluated at the respective maximum likelihood estimates. Table 2 These counts are generated from the original master file, and reported in the following files: ncount.txt – distribution of jobs per employment cycle for all workers ncountdropout.txt – distribution of jobs per employment cycle for dropouts only ncounths.txt – distribution of jobs per employment cycle for high school grads only ncountsomecoll.txt – distribution of jobs per employment cycle for those with some college only ncountcollege.txt – distribution of jobs per employment cycle for college grads only Table 3 Estimates for  are taken from Table 1. Estimates for a,b, and k were produced in MATLAB by minimizing the negative of the log likelihood function recnumlikelihood.m. The function recnumlikelihood.m in turn invokes another function, which the program assumes is in the same directory as recnumlikelihood.m: gu.m – function equal to likelihood of N=n for given u (integrate gu over u [0,1] to get likelihood of observing n records) Running fminsearch will yield the maximum likelihood estimates for the vector [a b k], and the variable constrdse computed in the program corresponds to the asymptotic standard errors for these coefficients. The data files used in the estimation are described at the beginning of recnumlikelihood.m . To call the relevant files, other files must be commented out (the path to call these files may need to be altered). The files are: ncount.txt – to estimate for all workers ncountdropout.txt – to estimate for dropouts only ncounths.txt – to estimate for high school grads only ncountsomecoll.txt – to estimate for those with some college only ncountcollege.txt – to estimate for college grads only Finally, the figure in the last column is based on running Monte Carlo simulations for the parameters estimated by maximum likelihood and computing the distribution of records in cycles where duration was less than 11 years. These simulations were performed in Matlab, using the program random.m, which in turn relies on solve_U_hat.m). After estimating MLE for recnumlikelihood for distribution of uncensored spells, we took the ratio of new estimates to original values reported in Table. We then inverted this ratio to deduce what adjustment to k, and, b must be to get a distribution of uncensored spells equal to the empirical distribution we use. Heterogeneity case reported in Section 6.3 These parameters were produced in MATLAB by minimizing the negative of the log likelihood function likelihood_hetero. The function likelihood_hetero.m in turn invokes another function, which the program assumes is in the same directory as likelihood_hetero.m: hetero.m – this function reflects the density function which, when integrated over [0,1], yields Pr (N=n) for each n Running fminsearch will yield the maximum likelihood estimates for the vector [ ], and the command sqrt (diag (covarmatrix)) at the end of the program corresponds to the asymptotic standard errors for these coefficients. The data files used in the estimation are described at the beginning of likelihood_hetero.m, and are the same as for recnumlikelihood.m . Calculations involving G(.) in Section 6.3 These calculations were performed using Mathematica. A file with the code for these calculations was provided to the Review of Economic Dynamics, entitled calculations_on_inefficiency_of_search.nb. Key to data files Data files: all data files are essentially descriptions of counts generated from the original master data drawn from the NLSY whose construction is described above. The nomenclature for files is that a file with no suffix is for all workers, while the suffix dropout refers to high school dropouts, hs refers to high school graduates, somecoll refers to those who have taken some college, and college refers to college graduates. Below are descriptions of the conditions stipulated for generating these counts: cyctenureXXX.txt – the first column represents a number of quarters, and the second represents the number of employment cycles which ended within that number of quarters since a worker reports starting his first job in the cycle. To be included, the first and last week of the cycle (WKCYCBEGWK and WKCYCENDWK) must be known; the cycle must have started on or before 1981, the cycle must have ended before the worker would have finished his schooling (so years of schooling must be available for the worker), and no job on the cycle can be censored. cyccensoredXXX.txt – the first column represents a number of quarters, and the second represents the number of employment cycles that lasted at least that many quarters but were censored. To be included, the first and last week of the cycle (WKCYCBEGWK and WKCYCENDWK) must be known; the cycle must have started on or before 1981, the cycle must have ended before the worker would have finished his schooling (so years of schooling must be available for the worker), and the cycle must be censored. jobtenureXXX.txt - the first column represents a number of quarters, and the second represents the number of jobs which ended within that number of quarters since a worker reports starting them. To be included, a job must have N_1_WKS = 1 (i.e. be the first job in the employment cycle), the first and last week fo the job (ACTSTART and ACTSTOP) must be known, the job must have started on or before 1981, the job must have ended before the worker would finished his schooling (so years of schooling must be available for the worker), and the duration of the job is uncensored. JobcensoredXXX.txt - the first column represents a number of quarters, and the second represents the number of jobs censored after that number of quarters since a worker reports starting them. To be included, a job must have N_1_WKS = 1 (i.e. be the first job in the employment cycle), the first and last week fo the job (ACTSTART and ACTSTOP) must be known, the job must have started on or before 1981, the job must have ended before the worker would finished his schooling (so years of schooling must be available for the worker), and job must be censored. jobcyccenXXX.txt – this file reports the joint distribution for the duration of the first job in the cycle and duration of the entire cycle. The first column represents the duration (in quarters) for the first job in the cycle, the second column represents the duration (in quarters) for the employment cycle, the column represents a variable that is equal to 1 if the cycle is uncensored and 3 if it is censored, and the last number represents the number of employment cycles that last the number of quarters in the second column (or at least that number if the cycle is censored) and where the first job ends after the number of quarters in the first column. To be included, the first and last week of the cycle (WKCYCBEGWK and WKCYCENDWK) must be known; the cycle must have started on or before 1981, the cycle must have ended before the worker would have finished his schooling (so years of schooling must be available for the worker), and the cycle must be censored. ncountXXX.txt – the first column represents a number of jobs, and the second represents the number of employment cycles that end with that many jobs. To be included, the first and last week of the cycle (WKCYCBEGWK and WKCYCENDWK) must be known; the cycle must have started on or before 1981, the cycle must have ended before the worker would have finished his schooling (so years of schooling must be available for the worker), and no job on the cycle can be censored.