Stata and Matlab codes for 
"Cyclical Part-Time Employment in an Estimated New Keynesian Model with Search Frictions" "
by Toshihiko Mukoyama, Mototsugu Shintani, and Kazuhiro Teramoto
Journal of Money, Credit and Banking. (19-270 R2)

1) Download Labor Flow Data from IPUMS-CPS, available from
https://cps.ipums.org/cps/

-----------------------------------------------------------
A. Making dta file for Stata
-----------------------------------------------------------
[A1] Select variables listed in cps_until_Jan2019.do.
[A2] IPUMS-CPS makes ipums_data.gz and cps_until_Jan2019.do.

-----------------------------------------------------------
B. Making dta file for Stata
-----------------------------------------------------------
[B1] Unzip ipums_data.gz.
[B2] Run cps_ipums_matching.do.

2) Run cps_ipums_matching_IPT_VPT.do

3) Run prg files in the folder `Eview' to generate FLOW_PROBABILITY_DETAIL_SA and EMP_STATUS_DETAIL_SA

4) Run margin_adjust_detail.m

5) Run margin_adjust_detail.do

6) Run decomposition_figure_margin_d_ver2.m, decomposition_figure_margin_2007M12_2009M11.m, and decomposition_figure_margin_2008M1_2009M12.m