Hie Joo Ahn, "The Role of Observed and Unobserved Heterogeneity in the Duration of Unemployment", Journal of Applied Econometrics, Vol. 38, No. 1, 2023, pp. 3-23. The input data are constructed from the CPS micro data originally downloaded from the NBER website (https://data.nber.org/data/cps_basic.html). The raw data are seasonally adjusted with Eviews (X11-ARIMA). The data used for the estimation are in the file input_data_final.csv, which is an ASCII file in DOS format. It is zipped in hja-data.zip. This file also contains raw data in .mat and .xlsx format and code files in .m format. Variable names: TL : temporary layoffs OS : other separation (permanent separation) QT : volunary job leavers RE : re-entrants to the labor force NE : new entrants to the labor force Duration category: 1: 1 month or less (less than 5 weeks) 2: 2-3 months (5-14 weeks) 3: 4-6 months (15-26 weeks) 4: 7-12 months (27-52 weeks) 5: 13 months and over (53 weeks and over) The input data are constructed from the CPS micro data. The raw data are seasonally adjusted with Eviews (X11-ARIMA). The data used for the estimation are in "input_data_final.xls" and "input_data_final.csv" in the "data" data folder. (MATLAB files for the estimation of state-space model) 1. Estimation of nonlinear state space model : A1_1_estimation_(reason).m 2. Estimation of White standard errors : A1_2_table2.m 3. Confidence bands a. Estimation : A1_3_fig3_6_confidencebands_(reason)_final.m b. Robustness checks (divided by civilian population): A1_3_confidencebands_fig345_civpopnormalize.m 4. Figure 1 : mean and standard deviation a. A1_5_section1_fig1.m 5. Figure 3: a. A1_3_fig3_6_confidencebands_tl_final b. A1_3_fig3_6_confidencebands_os_final c. A1_3_fig3_6_confidencebands_qt_final d. A1_3_fig3_6_confidencebands_re_final e. A1_3_fig3_6_confidencebands_ne_final 6. Figure 4 "GDD and share" a. A1_12_contribution_GDD.m 7. Figure 5 "typeL_PS_RE.xlsx" 8. Figure 6: a. A1_3_fig3_6_confidencebands_tl_final b. A1_3_fig3_6_confidencebands_os_final c. A1_3_fig3_6_confidencebands_qt_final d. A1_3_fig3_6_confidencebands_re_final e. A1_3_fig3_6_confidencebands_ne_final 9. Figure 7 "Share by reason" a. A1_4_shareL_fig7.m 10. Figure 8 "Contribution to the mean duration during the Great Recession" a. A1_13_dist_reason_inprogress_GR_v1.m (current final as of May 16th 2021) b. A1_13_dist_reason_inprogress_GR.m : with full path of GDD (both BD and RD) c. A1_13_dist_reason_inprogress_GR_GDD_analysis.m : computes the contribution of GDD d. A1_13_dist_reason_inprogress_GR_v2.m : computes the contribution of each factor to the mean duration when GDD = 0 e. A1_13_dist_reason_inprogress_GR_GDD.m : conducts various experiments (the raw file for A1_13_dist_reason_inprogress_GR_GDD_analysis.m) f. A1_14_counterfactual.m is needed for A1_13_... m files. 11. Figure 9 "Contribution to the mean duration of unemployment" a. A1_11_fig8_9_dist_reason_inprogress.m