diff --git a/16/paper.pdf b/16/paper.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f50292f272b8b535ffc2ab63ceba2093e12d28aa --- /dev/null +++ b/16/paper.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b5ae338ec3699f449e20338669b7fcce7522ff3f9943084eaa9525665daac6f +size 971330 diff --git a/16/replication_package/README.pdf b/16/replication_package/README.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8956961d4696688a07455ffe6b35489b234fde3a --- /dev/null +++ b/16/replication_package/README.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d60cb6d384e0a79cac61950d667bf28a63d1c072d4e23f3f6b337c1f3392919 +size 123422 diff --git a/16/replication_package/data/qwi_ca_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_ca_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..6d2b1f7a9b4b20486be6da1f6ec67b3e9ba58f92 --- /dev/null +++ b/16/replication_package/data/qwi_ca_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6214757ea21ed1797b295ca474a6769c54d414bb491a0d5c62fb325688003ae3 +size 17080416 diff --git a/16/replication_package/data/qwi_ca_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_ca_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..9860811bb49a7358ea5169e7646d2214330b7cb0 --- /dev/null +++ b/16/replication_package/data/qwi_ca_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:597965e819980e1a51273641797e4aac368ce556c588c595f3bd85701376b30c +size 92137946 diff --git a/16/replication_package/data/qwi_co_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_co_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..4b3b12afb62585c18aa632f2ca63ac069127442a --- /dev/null +++ b/16/replication_package/data/qwi_co_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73934710c3123a94778a4740c5b9b10090510d17fee26219857df9b4f0a4334f +size 14746193 diff --git a/16/replication_package/data/qwi_co_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_co_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..4755aeaf9e883abf3de4dbefaaed6b37ea234236 --- /dev/null +++ b/16/replication_package/data/qwi_co_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44db1da61c30b12f4ba7e5687e09d73d80c10808924e5a4c677805cae05767ae +size 78962977 diff --git a/16/replication_package/data/qwi_ct_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_ct_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..df5480f90b1eb8320f8ed4bd9dd0451eee018b47 --- /dev/null +++ b/16/replication_package/data/qwi_ct_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8da75b955ac0bb77fdd88ab8a5c5f20d14fffbeb1680153a94d3e1e2d3204ec +size 12698768 diff --git a/16/replication_package/data/qwi_ct_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_ct_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..0202b9bf203eefed24148bf32d14ba31c65c1a36 --- /dev/null +++ b/16/replication_package/data/qwi_ct_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:502d88697ab552947e8be40a1bdad319b0836133092564b38323a03e1075744d +size 67410337 diff --git a/16/replication_package/data/qwi_fl_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_fl_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..f2df3e881da6eec1e89b474f6171a22164fb48cf --- /dev/null +++ b/16/replication_package/data/qwi_fl_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a721440345dcb5413065e568cbc5d3bee15cd309dd0ddfccc23d219b2d113da8 +size 12580647 diff --git a/16/replication_package/data/qwi_fl_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_fl_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..212dd88a88529ac1312cce3e648154cc3cc8e806 --- /dev/null +++ b/16/replication_package/data/qwi_fl_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2961d2fafede6b419f0e8b638e87df968ace732b1f3d76f75e4c5386ed8a8497 +size 67377558 diff --git a/16/replication_package/data/qwi_ga_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_ga_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..8e1178e471f3bc412bc02d9ac444d671822be7e6 --- /dev/null +++ b/16/replication_package/data/qwi_ga_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1ccae0286cfeb17d8aaa0ce4cca661cf83a8e5a0d4314a817bf1fbe2e82e09e +size 12278627 diff --git a/16/replication_package/data/qwi_ga_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_ga_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..aeaa367d0fd402a7cdb0f72b1f7663d2e91908df --- /dev/null +++ b/16/replication_package/data/qwi_ga_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d05b906b9bb447e01e86cab41a1dd03b51e089969e3cf8d63313e398bd16cd60 +size 64955547 diff --git a/16/replication_package/data/qwi_hi_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_hi_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..16539b2d0de50316159884874e422ec64cde2aa8 --- /dev/null +++ b/16/replication_package/data/qwi_hi_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c014676bfb28d2f25c32ce3bd1dba62ac0d6010d85056a029cdd2d2a99594c1 +size 12234913 diff --git a/16/replication_package/data/qwi_hi_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_hi_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..0111e002d356685e1503e8401f8c034d9f05a4d2 --- /dev/null +++ b/16/replication_package/data/qwi_hi_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63a5aecbe92a54dbfd42866ffeba9b5326085c1bbc52f693d75485cbd04aa092 +size 64531548 diff --git a/16/replication_package/data/qwi_id_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_id_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..d2063aca41000345157b2242b9ff766e4e62688d --- /dev/null +++ b/16/replication_package/data/qwi_id_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba0b094071fdf0cce133ac2967f0344675d4a5525e40f5e1c262d0a4d75ba163 +size 15137985 diff --git a/16/replication_package/data/qwi_id_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_id_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..8c850722c597032fe5f31181193206c8e4b95fd9 --- /dev/null +++ b/16/replication_package/data/qwi_id_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecbbae9543c59a22f9d86f03634ff7ee68790785d5c87c2c6a31e516b5f7f2e2 +size 80823365 diff --git a/16/replication_package/data/qwi_il_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_il_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..56994482c6dd3d74fd2eb3cb09ac12f11743b804 --- /dev/null +++ b/16/replication_package/data/qwi_il_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b61d0b8e0d42ff4f8d977f737a5bf006406643b5cdbf6737a19c3c36b5c67d28 +size 15348122 diff --git a/16/replication_package/data/qwi_il_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_il_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..d41ecd61a081868a5fc7958a001a7999c826c2c6 --- /dev/null +++ b/16/replication_package/data/qwi_il_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e7aee651dee1c0b4cc8b55ed772847c0942e0cb010ecd51f0b6e56aa6a49efd +size 82322282 diff --git a/16/replication_package/data/qwi_in_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_in_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..cda02f41a58959c799cee5a4cd2d53f56f71f82c --- /dev/null +++ b/16/replication_package/data/qwi_in_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e06ffbd334b9396fa26bd1514215018db8667c555486f52742ed7b740db587a +size 11775612 diff --git a/16/replication_package/data/qwi_in_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_in_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..c3cc05cfbe9ea7fb547dca4af113f0bb0effc17f --- /dev/null +++ b/16/replication_package/data/qwi_in_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e001b4d3c7d1916bea678ae0b143d24bdc34f7d629ea46fc5614db6c46ba036 +size 63497788 diff --git a/16/replication_package/data/qwi_ks_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_ks_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..883845d36cf1ba0c9c80514a06bf19e3f5ddbcd4 --- /dev/null +++ b/16/replication_package/data/qwi_ks_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83a6665bd136ac77addfa330fbf4401a99e12ccdcf0945a6ea84ba667dc3b146 +size 14414789 diff --git a/16/replication_package/data/qwi_ks_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_ks_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..358df75b29e1d186e514aeb571cda3e4f2e140a0 --- /dev/null +++ b/16/replication_package/data/qwi_ks_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:337c4a02da9e93c877113b1caf657de9d632a64141b66490c051b7863153e827 +size 77254311 diff --git a/16/replication_package/data/qwi_la_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_la_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..1d322eff30ab28d65c32086e58a7f25af4f80d49 --- /dev/null +++ b/16/replication_package/data/qwi_la_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf92f0de5b3c57f44cb5bb9cdc4ea0bf5d4cfee5e5849d4f699aca3ad724b2b6 +size 13735225 diff --git a/16/replication_package/data/qwi_la_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_la_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..ed9ac834c00015e8a9f070a5b02577506f18db55 --- /dev/null +++ b/16/replication_package/data/qwi_la_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddb7de27bd30adcd27f3de0f906ceb017e5f1532d28caa4c193a8e5f7428933e +size 72857714 diff --git a/16/replication_package/data/qwi_md_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_md_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..18af3e97c8b2011cccee20d62637dd81338ac8af --- /dev/null +++ b/16/replication_package/data/qwi_md_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:954a52cecbdd81c36d6d791a46ff53e6582aa01b28ee91ed5ded5118c7b07197 +size 16398830 diff --git a/16/replication_package/data/qwi_md_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_md_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..cc7cfc3ed45abb309d9002e0a1d88fdee1d662ef --- /dev/null +++ b/16/replication_package/data/qwi_md_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cd08820dbb3e18f71d03d7faf8de62157a683754a747929210e266bbe714140 +size 88142336 diff --git a/16/replication_package/data/qwi_me_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_me_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..f46e96b01d7d5aca16e723c1a87fba8ac1efa384 --- /dev/null +++ b/16/replication_package/data/qwi_me_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb5dd2315478e710d6cbe84edc2dd8c50a0b44804a72a9efd12d0306c756f8c0 +size 12057281 diff --git a/16/replication_package/data/qwi_me_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_me_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..b3b6c29166d86c95dd1463eca4fff168e1d804fa --- /dev/null +++ b/16/replication_package/data/qwi_me_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:136e3c63097ac3cae48a49515136daed39ad4a29af3811b7f99f78cd026243b4 +size 63144112 diff --git a/16/replication_package/data/qwi_mn_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_mn_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..035f18cb80a2aa6d59974b8dbde6b75c4ee8129e --- /dev/null +++ b/16/replication_package/data/qwi_mn_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:083ba2b31a4e6211bb6f76bcf6807156f6bccb639c00e4a4632a6af6fbae83ff +size 13659197 diff --git a/16/replication_package/data/qwi_mn_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_mn_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..ad4cb51f92663908a1d12b58921e27eead642cee --- /dev/null +++ b/16/replication_package/data/qwi_mn_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6025ca2510926b1ac7f6e51310fba7411485beb8ffb2a86eef659dbde285ae86 +size 75003988 diff --git a/16/replication_package/data/qwi_mo_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_mo_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..eac3ae0ca518cc64b6c8fc2a1122f5e3a3d620cf --- /dev/null +++ b/16/replication_package/data/qwi_mo_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d874b31ac8934d037d996a4f4d61a6ca24bae6beb63ea8c85773c9e157fd3d3 +size 13297103 diff --git a/16/replication_package/data/qwi_mo_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_mo_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..456480e55a771530d04237ab0b78de98fdaed29f --- /dev/null +++ b/16/replication_package/data/qwi_mo_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1562009bd856ddca11f02656e8c2c2aa2c831ec7bd686b7956f5ed4abfdc2ce2 +size 72864744 diff --git a/16/replication_package/data/qwi_mt_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_mt_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..3ed0220df02d9c15c621e34a18a2421a106a4434 --- /dev/null +++ b/16/replication_package/data/qwi_mt_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6cc99bf93ece45ccbc78302f54972d1c924a8b1e71a4c1e79fc0b4595d96776 +size 13796506 diff --git a/16/replication_package/data/qwi_mt_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_mt_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..c526b702506509fd65b96014025536faeefefd1b --- /dev/null +++ b/16/replication_package/data/qwi_mt_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5161db313229bd5b1ebe73b69d96b9cd05be77d04bc453e78ab8be41962f9e9 +size 72730501 diff --git a/16/replication_package/data/qwi_nc_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_nc_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..1a6a0f5ecb71d6e3d7bf4ff6a85e7d3b58b28688 --- /dev/null +++ b/16/replication_package/data/qwi_nc_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4c5a9fb6b3f16dd0ab86c1156847534c1e5f86feb4cb917d681aa0d1808f2e3 +size 15162214 diff --git a/16/replication_package/data/qwi_nc_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_nc_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..a8c3214f1b148029e5910a1c9a9a4f11a8916980 --- /dev/null +++ b/16/replication_package/data/qwi_nc_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee7f87c8cc39176b81e5406b2277bfba2d85172952b4819127bf0ae27192704b +size 81405913 diff --git a/16/replication_package/data/qwi_nd_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_nd_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..543edbe656821f0d17f9d59ce463ec9548dfefa1 --- /dev/null +++ b/16/replication_package/data/qwi_nd_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:283d074739b6873c5ca1613b13e14b1e9bf2c8cf4110c49384aa18ee297c5b35 +size 10991039 diff --git a/16/replication_package/data/qwi_nd_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_nd_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..015a0c019d33f754211b646f12f180c8c125d0f6 --- /dev/null +++ b/16/replication_package/data/qwi_nd_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ab845a68d3ff427a82cec3c6b4d393068974fd6842b1d15ede11c895b5ccef5 +size 57792097 diff --git a/16/replication_package/data/qwi_nj_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_nj_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..bd485e476bd7cfc9c85d4c8ae58611eddad67a29 --- /dev/null +++ b/16/replication_package/data/qwi_nj_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9401588429afd3a0d4a38285109f05bf9e0be8f9924a31ec1973950eb7857f0d +size 13433740 diff --git a/16/replication_package/data/qwi_nj_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_nj_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..cd0e3c2b088a44bd2742404e13c9d5ad2222eefd --- /dev/null +++ b/16/replication_package/data/qwi_nj_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a601e94766b1f93f9251ffd6e8055cc33bd637dc68d328e982d83051ed6f0a69 +size 71063591 diff --git a/16/replication_package/data/qwi_nm_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_nm_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..74780e48c9b6ba4d4853c5b492b9fbe1b7974b3a --- /dev/null +++ b/16/replication_package/data/qwi_nm_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7025c9374cf3d12e9e27fa212a7296d8f6bbe062650f83dc58b882cee0729b7 +size 12802460 diff --git a/16/replication_package/data/qwi_nm_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_nm_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..410c5f7fe6117f1d56ac097de95394b542ad4e83 --- /dev/null +++ b/16/replication_package/data/qwi_nm_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:135ef92e3352908f74fa5e8815c82970c66d4b26716f05f0ae30f7ff9935c14d +size 68361437 diff --git a/16/replication_package/data/qwi_nv_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_nv_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..b15048d159983e8d249ea3d8ba772b92a1cb3c9e --- /dev/null +++ b/16/replication_package/data/qwi_nv_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eab505fe99b68a31a5502f7019b1881aa04130da596c4522ebc7e47fc325cbe1 +size 11592328 diff --git a/16/replication_package/data/qwi_nv_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_nv_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..bf0b295f15ecd7f232491c932dabc4074bfb13e5 --- /dev/null +++ b/16/replication_package/data/qwi_nv_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c0316551e6fc764551a80feb17b2f7ca2eade60854bd1ca04d9feef4ffb3daf +size 61487840 diff --git a/16/replication_package/data/qwi_pa_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_pa_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..1220f39047d9c2108efd39fbf477f3ba40ea326b --- /dev/null +++ b/16/replication_package/data/qwi_pa_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9cdff9323cd176ee3accebc3e5276660e077345f0f23ecaee329a0c91016bb6c +size 12843132 diff --git a/16/replication_package/data/qwi_pa_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_pa_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..f2d64bb8c09e844a326e18f91407aea46a864d8d --- /dev/null +++ b/16/replication_package/data/qwi_pa_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b6b2a7063021463952ddc3e654bfd25ab04da4b4d5826afa0cdc7a7b6fe71b0 +size 68844895 diff --git a/16/replication_package/data/qwi_ri_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_ri_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..d600870963ac093ad18ad3d074bf8ed432263685 --- /dev/null +++ b/16/replication_package/data/qwi_ri_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61cbc589559495d91e127d166e44a3bfcb77d6775cbf5cf9e9d46b4a6bfe1f62 +size 12597349 diff --git a/16/replication_package/data/qwi_ri_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_ri_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..0e6a7f548b9656e1b7079309b1a61979b7949086 --- /dev/null +++ b/16/replication_package/data/qwi_ri_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6539e56c890b4782b92229f1d80a5b23b1bf677b1991b4c9d3dac60f796def3 +size 64763987 diff --git a/16/replication_package/data/qwi_sc_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_sc_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..0564774822fd6392e18950c0d630e986fbe30400 --- /dev/null +++ b/16/replication_package/data/qwi_sc_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51031a9e4c921753e7a411b2ba3828ae24bb81d68b1746191cae00da04e372b4 +size 11678372 diff --git a/16/replication_package/data/qwi_sc_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_sc_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..84f2bc4615efb0383968fb48e8f508e3998ada25 --- /dev/null +++ b/16/replication_package/data/qwi_sc_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3b3e90397c9a60f85caa64dfb2b956caf68271d3b55d63a79215ac679ba238d +size 61969705 diff --git a/16/replication_package/data/qwi_sd_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_sd_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..2a07a0c36ff37712f2e4560da21631631ccf3765 --- /dev/null +++ b/16/replication_package/data/qwi_sd_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce1d0b4a437d36babc0e1f45f0f494853001bb229746989c0c083f9a67472df6 +size 10041012 diff --git a/16/replication_package/data/qwi_sd_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_sd_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..8859d04700ddb7c840541a820cf5e54534759ee2 --- /dev/null +++ b/16/replication_package/data/qwi_sd_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d9c5ac6123480ac456599ec0535edb40552cfd32c115dbea8b0d5b6c7ca553d +size 54673928 diff --git a/16/replication_package/data/qwi_tn_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_tn_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..b35c47faffc43c9c118ebc522fda489d57f54e0b --- /dev/null +++ b/16/replication_package/data/qwi_tn_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25465ee9610bd31f5ade0709891ec3ed327d8a9b895d9c329fe567dbe557b22c +size 11762328 diff --git a/16/replication_package/data/qwi_tn_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_tn_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..a4357d48e61cec88821433eebf0f67033d1efd1d --- /dev/null +++ b/16/replication_package/data/qwi_tn_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ad83f51a30233924218d6a3ece37a310ec8c6da4abfe878be420c0fd7778712 +size 62785385 diff --git a/16/replication_package/data/qwi_tx_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_tx_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..5bd0f1dd2ee2bcb59298426e5c136ce2c8b76bc1 --- /dev/null +++ b/16/replication_package/data/qwi_tx_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d1be5232af2383b1a37ec7f100ccb32ca2bceaea6f2f80d66027b32ff1f6f02 +size 14420437 diff --git a/16/replication_package/data/qwi_tx_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_tx_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..f99d5d134693102d576495fa14124d9277afc7b3 --- /dev/null +++ b/16/replication_package/data/qwi_tx_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f556a25c7e595029171922265473b3fbed54ba57275877994c0a8d3f9d00a6c8 +size 77849623 diff --git a/16/replication_package/data/qwi_va_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_va_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..b90d2ac9b91075bd1f0d06a9559237517f44bfe5 --- /dev/null +++ b/16/replication_package/data/qwi_va_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b0a2daa643c1698431df6e0fae682289d23e2c8a156a2577d741ae3b0a436a5 +size 11475424 diff --git a/16/replication_package/data/qwi_va_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_va_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..f88262c66af2d0731dfcedda2d1be4e9cdcc1215 --- /dev/null +++ b/16/replication_package/data/qwi_va_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:448e17678c01d2ce21c6eb22c89d793b11c7bc335c7b7908a272b494a2f979af +size 62521379 diff --git a/16/replication_package/data/qwi_wa_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_wa_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..d5007a1ce1fa2b5d02a6d2687a9e3bb7f14266f9 --- /dev/null +++ b/16/replication_package/data/qwi_wa_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b35a976722212af486555b00af46dd470b2aa898939ad62b2f9ea3069eb9f28c +size 16668843 diff --git a/16/replication_package/data/qwi_wa_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_wa_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..4dc72eeaf1a67b52c671d175029189ec7bccd809 --- /dev/null +++ b/16/replication_package/data/qwi_wa_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42909edb80c87947683093861f722065180b6956406ff549beeafb9a92b3f968 +size 80779769 diff --git a/16/replication_package/data/qwi_wv_sa_f_gs_ns_op_u.csv b/16/replication_package/data/qwi_wv_sa_f_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..67396397a1435c16f3c6fef5b3d2d3841ef3cd2e --- /dev/null +++ b/16/replication_package/data/qwi_wv_sa_f_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42f0f1e2a5e465c782de1d87d09ee7c609606e3081301ae0d746a0fa9f16149f +size 11832333 diff --git a/16/replication_package/data/qwi_wv_sa_fs_gs_ns_op_u.csv b/16/replication_package/data/qwi_wv_sa_fs_gs_ns_op_u.csv new file mode 100644 index 0000000000000000000000000000000000000000..62249229305c84974ef834b6aadf86499c422375 --- /dev/null +++ b/16/replication_package/data/qwi_wv_sa_fs_gs_ns_op_u.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21272a62af5b3feed53048baacfcb1ff45da1cdf2e1e8f653a590674ac3ef005 +size 62233806 diff --git a/16/replication_package/programs/calculate_mean_wages.m b/16/replication_package/programs/calculate_mean_wages.m new file mode 100644 index 0000000000000000000000000000000000000000..a109bec3821afcd843df79d27d6af2a59b32ccb0 --- /dev/null +++ b/16/replication_package/programs/calculate_mean_wages.m @@ -0,0 +1,50 @@ +% This is not a function m-file, but rather just a block of code that we +% need to run repeatedly to calculate mean wages + + +% Calculate ergodic distribution. +% 5 "states": unemployed, paying k_h and unknown type, not paying k_h and +% unknown type, paying k_h and known type, not paying k_h and +% known type + +tmatrix=[1-pf*probmatch, lam+(1-lam)*alph*(1-probg), lam+(1-lam)*alph*(1-probg), lam, lam;... + pf*probmatch, (1-lam)*(1-pkh)*(1-alph), 0, 0, 0;... + 0, (1-lam)*(1-alph)*pkh, (1-lam)*(1-alph), 0, 0;... + 0, (1-lam)*(1-pkh)*alph*probg, 0, (1-lam)*(1-pkh), 0;... + 0, (1-lam)*pkh*alph*probg, (1-lam)*alph*probg, (1-lam)*pkh, (1-lam)]; + +% steady state distribution +mtr=eye(5)-tmatrix; +mtr(5,1:5)=1; +invmtr=inv(mtr); +erg=invmtr(:,5); +u=erg(1); % unemployment +e0pi=erg(2); % matches paying k_h, unknown type +e1pi=erg(3); % matches not paying k_h, unknown type +e01=erg(4); % matches paying k_h, known type +e11=erg(5); % matches not paying k_h, known type + +% % Mean wages +meanwages=(e01*w0(end)+e11*w1(end)+((e0pi*w0+e1pi*w1).*H_pi_dist)*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)))/(1-u); + +% calculate the distribution across the 5 states, as a function of tenure + +nperiods=260; % # of periods to calculate profile +tendist=[0;1;0;0;0]; +trans1=tmatrix; +trans1(:,1)=0; % don't allow any exits from unemployment after first period, so this just tracks the initial mass of entrants +for i=2:nperiods + tendist(:,i)=trans1*tendist(:,i-1) ; +end + +% calculate average wages as a function of tenure: + +ave_wg_ten_profile= [w0.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w1.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w0(end) w1(end)]*tendist(2:5,:)./sum(tendist(2:5,:)); + +mean_wages_first_qtr=sum([w0.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w1.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w0(end) w1(end)]*tendist(2:5,1:13))./sum(sum(tendist(2:5,1:13))); + +mean_wages_first_year=sum([w0.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w1.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w0(end) w1(end)]*tendist(2:5,1:52))./sum(sum(tendist(2:5,1:52))); + +mean_wages_third_year=sum([w0.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w1.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w0(end) w1(end)]*tendist(2:5,105:156))./sum(sum(tendist(2:5,105:156))); + +mean_wages_fifth_year=sum([w0.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w1.*H_pi_dist*(pigrid>pibar)'/sum(H_pi_dist(pigrid>pibar)) w0(end) w1(end)]*tendist(2:5,209:260))./sum(sum(tendist(2:5,209:260))); \ No newline at end of file diff --git a/16/replication_package/programs/moments.m b/16/replication_package/programs/moments.m new file mode 100644 index 0000000000000000000000000000000000000000..5a93fd793d7956e6e1dd26e4baf3c0a8b3195f8d --- /dev/null +++ b/16/replication_package/programs/moments.m @@ -0,0 +1,35 @@ +function Z=moments(x, targs) + +% If a second argument is passed, it contains that targeted values,and the +% sum of squared errors is returned (for the function minimizer that seeks +% the parameters that can match the targets). If there is no second +% argument, the function just calculates values for the four moments, which +% are available as global variables in the calling program. + +global delta1 delta2 delta3 hirerate + +pigood=x(1); +alpha=x(2); +lam=x(3); + +M=1; + +T=2000; +empg(1)=pigood;empb(1)=1-pigood; +for j=2:T + empg(j)=empg(j-1)*(1-lam); + empb(j)=empb(j-1)*(1-alpha)*(1-lam); +end + +emp=empg+empb; + +delta1=(13*emp(1)-sum(emp(2:14)))/(13*(M)); +delta2=(sum(emp(2:14))-sum(emp(15:27)))/sum(emp(2:14)); +delta3=(sum(emp(15:T))-sum(emp(28:T)))/sum(emp(15:T)); +hirerate=13*emp(1)/(sum(emp)+12*(M)); + +if nargin==2 +Z=(log(targs(1))-log(delta1))^2+... + (log(targs(2))-log(delta2))^2+... + (log(targs(3))-log(delta3))^2; +end \ No newline at end of file diff --git a/16/replication_package/programs/shortjobs_firmsize.do b/16/replication_package/programs/shortjobs_firmsize.do new file mode 100644 index 0000000000000000000000000000000000000000..3512ab1af447c888219475637ed8437166600b33 --- /dev/null +++ b/16/replication_package/programs/shortjobs_firmsize.do @@ -0,0 +1,179 @@ +set more off + +clear + +// cd "G:\My Drive\Research\ShortJobs\AEJM\Final" + +**Extract the data from the raw qwi files (comment out this next line if the qwi_fs.dta data file has already been created) +qui do shortjobs_qwi_fs + +use qwi_fs, replace + +keep if sex == 0 +drop sex +keep if agegrp=="A00" +drop agegrp +keep if industry=="00" +drop industry +drop if firmsize==0 + +**Generate variables of interest + +sort geography firmsize year quarter + +egen cell=group(firmsize year quarter) + +** aggregate over geography +bysort cell: egen allhira=total(hira) // hires in the quarter +bysort cell: egen allhiras=total(hiras) // "stable" hires, workers in second quarter of employment +bysort cell: egen allhiraend=total(hiraend) // all hires that also survive into second quarter +bysort cell: egen allemp=total(emp) // beginning of quarter employment (had earnings last quarter and this quarter) +bysort cell: egen allempend=total(empend) // end of quarter employment (have earnings this quarter and next quarter) +bysort cell: egen allemptot=total(emptotal) // total count of people employed in the quarter +bysort cell: egen allsep=total(sep) // total separations +bysort cell: egen allsepbeg=total(sepbeg) // total separations of employment spells that existed in previous quarter + +bysort cell: keep if _n==1 +drop geography + +egen cellid=group(firmsize) + +generate employ=(allemp+allempend)/2 + +generate oneqsepsrate1=(allhira-allhiraend)/employ // spells that begin and end in the same quarter, as fraction of average of beginning and end employment + +generate oneqsepsrate=(allhira-allhiraend)/allemptot // spells that begin and end in the same quarter, as fraction of total count of employment spells in the quarter + +generate oneqhazrate=(allhira-allhiraend)/allhira // fraction of all hires in the quarter that also end in the quarter + +generate twoplussepsrate=(allsepbeg)/allemptot //separations among spells with 2+ quarters of tenure, as fraction total count of employment spells in the quarter + +generate twoplushazrate=(allsepbeg)/(allemptot-allhira) //separations among spells with 2+ quarters of tenure, as fraction of all such spells + +xtset cellid time +generate twoqsepsrate=(L.allhiraend-allhiras)/allemptot //spells that separate by end of second quarter (all that started two quarters ago, minus the ones that we know continue past current quarter), as fraction of total count employment spells in quarter + +generate twoqhazrate=(L.allhiraend-allhiras)/L.allhiraend // spells that separate by end of second quarter, as fraction of spells that have lasted two quarters + +generate threeplussepsrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/allemptot //separations among spells that have lasted three or more quarters, as fraction of total count of employment spells in the quarter + +generate threeplushazrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/(allemptot-L.allhiraend-allhira) //separations among spells that have lasted three or more quarters, as fraction of all such spells + +generate sepsrate=allsep/allemptot // overall separation rate + +generate hirerate1=allhira/employ // hires as a fraction of average of beginning and end employment + +generate hirerate=allhira/allemptot // hires as a fraction of total count of employmen spells in the quarter + +drop if time<=1998*4+4 | time>2018*4 + +**Seasonally adjust by regressing on quarterly dummies + +set matsize 2000 + +quietly{ +generate oneqsepsrate1sa=. +generate oneqsepsratesa=. +generate oneqhazratesa=. +generate twoplussepsratesa=. +generate twoplushazratesa=. +generate twoqsepsratesa=. +generate twoqhazratesa=. +generate threeplussepsratesa=. +generate threeplushazratesa=. +generate sepsratesa=. +generate hirerate1sa=. +generate hireratesa=. + +sort cell date +by cell: egen oneqsepsrate1means=mean(oneqsepsrate1) +by cell: egen oneqsepsratemeans=mean(oneqsepsrate) +by cell: egen oneqhazratemeans=mean(oneqhazrate) +by cell: egen twoplussepsratemeans=mean(twoplussepsrate) +by cell: egen twoplushazratemeans=mean(twoplushazrate) +by cell: egen twoqsepsratemeans=mean(twoqsepsrate) +by cell: egen twoqhazratemeans=mean(twoqhazrate) +by cell: egen threeplussepsratemeans=mean(threeplussepsrate) +by cell: egen threeplushazratemeans=mean(threeplushazrate) +by cell: egen sepsratemeans=mean(sepsrate) +by cell: egen hirerate1means=mean(hirerate1) +by cell: egen hireratemeans=mean(hirerate) + +forvalues i=1/5{ // there are 5 firmsize cells + reg oneqsepsrate1 i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsrate1sa=sa+oneqsepsrate1means if cellid==`i' + drop sa + reg oneqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsratesa=sa+oneqsepsratemeans if cellid==`i' + drop sa + reg oneqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqhazratesa=sa+oneqhazratemeans if cellid==`i' + drop sa + reg twoplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplussepsratesa=sa+twoplussepsratemeans if cellid==`i' + drop sa + reg twoplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplushazratesa=sa+twoplushazratemeans if cellid==`i' + drop sa + reg twoqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqsepsratesa=sa+twoqsepsratemeans if cellid==`i' + drop sa + reg twoqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqhazratesa=sa+twoqhazratemeans if cellid==`i' + drop sa + reg threeplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplussepsratesa=sa+threeplussepsratemeans if cellid==`i' + drop sa + reg threeplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplushazratesa=sa+threeplushazratemeans if cellid==`i' + drop sa + reg sepsrate i.quarter if cellid==`i' + predict double sa, residual + replace sepsratesa=sa+sepsratemeans if cellid==`i' + drop sa + reg hirerate1 i.quarter if cellid==`i' + predict double sa, residual + replace hirerate1sa=sa+hirerate1means if cellid==`i' + drop sa + reg hirerate i.quarter if cellid==`i' + predict double sa, residual + replace hireratesa=sa+hireratemeans if cellid==`i' + drop sa + } +} + +save shortjobs_fs, replace + +sort cellid time + +by cellid: generate oneqsepsratesa_first=(oneqsepsratesa[1]+oneqsepsratesa[2]+oneqsepsratesa[3]+oneqsepsratesa[4])/4 +by cellid: generate oneqsepsratesa_last=(oneqsepsratesa[_N]+oneqsepsratesa[_N-1]+oneqsepsratesa[_N-2]+oneqsepsratesa[_N-3])/4 +by cellid: generate hireratesa_first=(hireratesa[1]+hireratesa[2]+hireratesa[3]+hireratesa[4])/4 +by cellid: generate hireratesa_last=(hireratesa[_N]+hireratesa[_N-1]+hireratesa[_N-2]+hireratesa[_N-3])/4 + +by cellid: keep if _n==1 + +input str16 fs_label +"0-19" +"20-49" +"50-249" +"250-499" +"500+" + +graph twoway (scatter oneqsepsratesa_last oneqsepsratesa_first in 1/5, mlabel(fs_label) xtitle("1999 One quarter incidence rate (q{sub:1})") ytitle("2017 One quarter incidence rate (q{sub:1})")) (function y = x, range(.04 .14) lcolor(black) legend(off)) +graph rename oneqseps_firstlast_firmsize, replace +graph export oneqseps_firstlast_firmsize.pdf, name(oneqseps_firstlast_firmsize) as(pdf) replace + +graph twoway (scatter hireratesa_last hireratesa_first in 1/5, mlabel(fs_label) xtitle("1999 Hires rate (h)") ytitle("2017 Hires rate (h)")) (function y = x, range(.14 .3) lcolor(black) legend(off)) +graph rename hirerate_firstlast_firmsize, replace +graph export hirerate_firstlast_firmsize.pdf, name(hirerate_firstlast_firmsize) as(pdf) replace + diff --git a/16/replication_package/programs/shortjobs_geography.do b/16/replication_package/programs/shortjobs_geography.do new file mode 100644 index 0000000000000000000000000000000000000000..34bc90b0fa330f0491e73d317cd092e8a4b6d5ac --- /dev/null +++ b/16/replication_package/programs/shortjobs_geography.do @@ -0,0 +1,195 @@ +set more off + +clear + +//cd "H:\My Drive\Research\ShortJobs\AEJM\Revision" + +**Extract the data from the raw qwi files (comment out this next line if the qwisa.dta data file has already been created) +//qui do shortjobs_qwisa + +use qwisa, replace + +keep if sex == 0 +drop sex +keep if agegrp=="A00" +drop agegrp +keep if industry=="00" +drop industry + +**Generate variables of interest + +generate allhira=hira // hires in the quarter +generate allhiras=hiras // "stable" hires, workers in second quarter of employment +generate allhiraend=hiraend // all hires that also survive into second quarter +generate allemp=emp // beginning of quarter employment (had earnings last quarter and this quarter +generate allempend=empend // end of quarter employment (have earnings this quarter and next quarter +generate allemptot=emptotal // total count of people employed in the quarter +generate allsep=sep // total separations +generate allsepbeg=sepbeg // total separations of employment spells that existed in previous quarter + +egen cellid=group(geography) + +generate employ=(allemp+allempend)/2 + +generate oneqsepsrate1=(allhira-allhiraend)/employ // spells that begin and end in the same quarter, as fraction of average of beginning and end employment + +generate oneqsepsrate=(allhira-allhiraend)/allemptot // spells that begin and end in the same quarter, as fraction of total count of employment spells in the quarter + +generate oneqhazrate=(allhira-allhiraend)/allhira // fraction of all hires in the quarter that also end in the quarter + +generate twoplussepsrate=(allsepbeg)/allemptot //separations among spells with 2+ quarters of tenure, as fraction total count of employment spells in the quarter + +generate twoplushazrate=(allsepbeg)/(allemptot-allhira) //separations among spells with 2+ quarters of tenure, as fraction of all such spells + +xtset cellid time +generate twoqsepsrate=(L.allhiraend-allhiras)/allemptot //spells that separate by end of second quarter (all that started two quarters ago, minus the ones that we know continue past current quarter), as fraction of total count employment spells in quarter + +generate twoqhazrate=(L.allhiraend-allhiras)/L.allhiraend // spells that separate by end of second quarter, as fraction of spells that have lasted two quarters + +generate threeplussepsrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/allemptot //separations among spells that have lasted three or more quarters, as fraction of total count of employment spells in the quarter + +generate threeplushazrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/(allemptot-L.allhiraend-allhira) //separations among spells that have lasted three or more quarters, as fraction of all such spells + +generate sepsrate=allsep/allemptot // overall separation rate + +generate hirerate1=allhira/employ // hires as a fraction of average of beginning and end employment + +generate hirerate=allhira/allemptot // hires as a fraction of total count of employmen spells in the quarter + +drop if time<=1998*4+4 | time>2018*4 + +**Seasonally adjust by regressing on quarterly dummies + +set matsize 2000 + +quietly{ +generate oneqsepsrate1sa=. +generate oneqsepsratesa=. +generate oneqhazratesa=. +generate twoplussepsratesa=. +generate twoplushazratesa=. +generate twoqsepsratesa=. +generate twoqhazratesa=. +generate threeplussepsratesa=. +generate threeplushazratesa=. +generate sepsratesa=. +generate hirerate1sa=. +generate hireratesa=. + +sort cell date +by cell: egen oneqsepsrate1means=mean(oneqsepsrate1) +by cell: egen oneqsepsratemeans=mean(oneqsepsrate) +by cell: egen oneqhazratemeans=mean(oneqhazrate) +by cell: egen twoplussepsratemeans=mean(twoplussepsrate) +by cell: egen twoplushazratemeans=mean(twoplushazrate) +by cell: egen twoqsepsratemeans=mean(twoqsepsrate) +by cell: egen twoqhazratemeans=mean(twoqhazrate) +by cell: egen threeplussepsratemeans=mean(threeplussepsrate) +by cell: egen threeplushazratemeans=mean(threeplushazrate) +by cell: egen sepsratemeans=mean(sepsrate) +by cell: egen hirerate1means=mean(hirerate1) +by cell: egen hireratemeans=mean(hirerate) + +forvalues i=1/30{ // there are 30 geography cells + reg oneqsepsrate1 i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsrate1sa=sa+oneqsepsrate1means if cellid==`i' + drop sa + reg oneqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsratesa=sa+oneqsepsratemeans if cellid==`i' + drop sa + reg oneqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqhazratesa=sa+oneqhazratemeans if cellid==`i' + drop sa + reg twoplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplussepsratesa=sa+twoplussepsratemeans if cellid==`i' + drop sa + reg twoplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplushazratesa=sa+twoplushazratemeans if cellid==`i' + drop sa + reg twoqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqsepsratesa=sa+twoqsepsratemeans if cellid==`i' + drop sa + reg twoqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqhazratesa=sa+twoqhazratemeans if cellid==`i' + drop sa + reg threeplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplussepsratesa=sa+threeplussepsratemeans if cellid==`i' + drop sa + reg threeplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplushazratesa=sa+threeplushazratemeans if cellid==`i' + drop sa + reg sepsrate i.quarter if cellid==`i' + predict double sa, residual + replace sepsratesa=sa+sepsratemeans if cellid==`i' + drop sa + reg hirerate1 i.quarter if cellid==`i' + predict double sa, residual + replace hirerate1sa=sa+hirerate1means if cellid==`i' + drop sa + reg hirerate i.quarter if cellid==`i' + predict double sa, residual + replace hireratesa=sa+hireratemeans if cellid==`i' + drop sa + } +} + +save shortjobs_geography, replace + +sort cellid time + +by cellid: generate oneqsepsratesa_first=(oneqsepsratesa[1]+oneqsepsratesa[2]+oneqsepsratesa[3]+oneqsepsratesa[4])/4 +by cellid: generate oneqsepsratesa_last=(oneqsepsratesa[_N]+oneqsepsratesa[_N-1]+oneqsepsratesa[_N-2]+oneqsepsratesa[_N-3])/4 +by cellid: generate hireratesa_first=(hireratesa[1]+hireratesa[2]+hireratesa[3]+hireratesa[4])/4 +by cellid: generate hireratesa_last=(hireratesa[_N]+hireratesa[_N-1]+hireratesa[_N-2]+hireratesa[_N-3])/4 + +by cellid: keep if _n==1 + +input str16 geography_label +"CA" +"CO" +"CT" +"FL" +"GA" +"HI" +"ID" +"IL" +"IN" +"KS" +"LA" +"ME" +"MD" +"MN" +"MO" +"MT" +"NV" +"NJ" +"NM" +"NC" +"ND" +"PA" +"RI" +"SC" +"SD" +"TN" +"TX" +"VA" +"WA" +"WV" + +graph twoway (scatter oneqsepsratesa_last oneqsepsratesa_first in 1/30, mlabel(geography_label) xtitle("1999 One quarter incidence rate (q{sub:1})") ytitle("2017 One quarter incidence rate (q{sub:1})")) (function y=x, range(.04 .14) lcolor(black) legend(off)) +graph rename oneqseps_firstlast_geography, replace +graph export oneqseps_firstlast_geography.pdf, name(oneqseps_firstlast_geography) as(pdf) replace + +graph twoway (scatter hireratesa_last hireratesa_first in 1/30, mlabel(geography_label) xtitle("1999 Hires rate (h)") ytitle("2017 Hires rate (h)")) (function y=x, range(.1 .32) lcolor(black) legend(off)) +graph rename hirerate_firstlast_geography, replace +graph export hirerate_firstlast_geography.pdf, name(hirerate_firstlast_geography) as(pdf) replace + diff --git a/16/replication_package/programs/shortjobs_industry.do b/16/replication_package/programs/shortjobs_industry.do new file mode 100644 index 0000000000000000000000000000000000000000..c01e2bf83298c1cdb3db4f5ddbe35ec74daf4139 --- /dev/null +++ b/16/replication_package/programs/shortjobs_industry.do @@ -0,0 +1,192 @@ +set more off + +clear + +// cd "H:\My Drive\Research\ShortJobs\AEJM\Revision" + +**Extract the data from the raw qwi files (comment out this next line if the qwisa.dta data file has already been created) + +//qui do shortjobs_qwisa + +use qwisa, replace + +keep if sex == 0 +drop sex +keep if agegrp=="A00" +drop agegrp +drop if industry=="00" | industry=="92" + +**Generate variables of interest + +sort geography industry year quarter + +egen cell=group(industry year quarter) + +** aggregate over geography +bysort cell: egen allhira=total(hira) // hires in the quarter +bysort cell: egen allhiras=total(hiras) // "stable" hires, workers in second quarter of employment +bysort cell: egen allhiraend=total(hiraend) // all hires that also survive into second quarter +bysort cell: egen allemp=total(emp) // beginning of quarter employment (had earnings last quarter and this quarter) +bysort cell: egen allempend=total(empend) // end of quarter employment (have earnings this quarter and next quarter) +bysort cell: egen allemptot=total(emptotal) // total count of people employed in the quarter +bysort cell: egen allsep=total(sep) // total separations +bysort cell: egen allsepbeg=total(sepbeg) // total separations of employment spells that existed in previous quarter + +bysort cell: keep if _n==1 +drop geography + +egen cellid=group(industry) + +generate employ=(allemp+allempend)/2 + +generate oneqsepsrate1=(allhira-allhiraend)/employ // spells that begin and end in the same quarter, as fraction of average of beginning and end employment + +generate oneqsepsrate=(allhira-allhiraend)/allemptot // spells that begin and end in the same quarter, as fraction of total count of employment spells in the quarter + +generate oneqhazrate=(allhira-allhiraend)/allhira // fraction of all hires in the quarter that also end in the quarter + +generate twoplussepsrate=(allsepbeg)/allemptot //separations among spells with 2+ quarters of tenure, as fraction total count of employment spells in the quarter + +generate twoplushazrate=(allsepbeg)/(allemptot-allhira) //separations among spells with 2+ quarters of tenure, as fraction of all such spells + +xtset cellid time +generate twoqsepsrate=(L.allhiraend-allhiras)/allemptot //spells that separate by end of second quarter (all that started two quarters ago, minus the ones that we know continue past current quarter), as fraction of total count emp. spells in quarter + +generate twoqhazrate=(L.allhiraend-allhiras)/L.allhiraend // spells that separate by end of second quarter, as fraction of spells that have lasted two quarters + +generate threeplussepsrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/allemptot //separations among spells that have lasted three or more quarters, as fraction of total count of employment spells in the quarter + +generate threeplushazrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/(allemptot-L.allhiraend-allhira) //separations among spells that have lasted three or more quarters, as fraction of all such spells + +generate sepsrate=allsep/allemptot // overall separation rate + +generate hirerate1=allhira/employ // hires as a fraction of average of beginning and end employment + +generate hirerate=allhira/allemptot // hires as a fraction of total count of employmen spells in the quarter + +drop if time<=1998*4+4 | time>2018*4-2 //have to end two quarters earlier than in the sex_age data because 'industry' data still has some missing values in 2017q4 + +**Seasonally adjust by regressing on quarterly dummies + +set matsize 2000 + +quietly{ +generate oneqsepsrate1sa=. +generate oneqsepsratesa=. +generate oneqhazratesa=. +generate twoplussepsratesa=. +generate twoplushazratesa=. +generate twoqsepsratesa=. +generate twoqhazratesa=. +generate threeplussepsratesa=. +generate threeplushazratesa=. +generate sepsratesa=. +generate hirerate1sa=. +generate hireratesa=. + +sort cellid date +by cellid: egen oneqsepsrate1means=mean(oneqsepsrate1) +by cellid: egen oneqsepsratemeans=mean(oneqsepsrate) +by cellid: egen oneqhazratemeans=mean(oneqhazrate) +by cellid: egen twoplussepsratemeans=mean(twoplussepsrate) +by cellid: egen twoplushazratemeans=mean(twoplushazrate) +by cellid: egen twoqsepsratemeans=mean(twoqsepsrate) +by cellid: egen twoqhazratemeans=mean(twoqhazrate) +by cellid: egen threeplussepsratemeans=mean(threeplussepsrate) +by cellid: egen threeplushazratemeans=mean(threeplushazrate) +by cellid: egen sepsratemeans=mean(sepsrate) +by cellid: egen hirerate1means=mean(hirerate1) +by cellid: egen hireratemeans=mean(hirerate) + +forvalues i=1/19{ // there are 19 industry cells + reg oneqsepsrate1 i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsrate1sa=sa+oneqsepsrate1means if cellid==`i' + drop sa + reg oneqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsratesa=sa+oneqsepsratemeans if cellid==`i' + drop sa + reg oneqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqhazratesa=sa+oneqhazratemeans if cellid==`i' + drop sa + reg twoplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplussepsratesa=sa+twoplussepsratemeans if cellid==`i' + drop sa + reg twoplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplushazratesa=sa+twoplushazratemeans if cellid==`i' + drop sa + reg twoqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqsepsratesa=sa+twoqsepsratemeans if cellid==`i' + drop sa + reg twoqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqhazratesa=sa+twoqhazratemeans if cellid==`i' + drop sa + reg threeplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplussepsratesa=sa+threeplussepsratemeans if cellid==`i' + drop sa + reg threeplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplushazratesa=sa+threeplushazratemeans if cellid==`i' + drop sa + reg sepsrate i.quarter if cellid==`i' + predict double sa, residual + replace sepsratesa=sa+sepsratemeans if cellid==`i' + drop sa + reg hirerate1 i.quarter if cellid==`i' + predict double sa, residual + replace hirerate1sa=sa+hirerate1means if cellid==`i' + drop sa + reg hirerate i.quarter if cellid==`i' + predict double sa, residual + replace hireratesa=sa+hireratemeans if cellid==`i' + drop sa + } +} + +save shortjobs_industry, replace + +sort cellid time + +by cellid: generate oneqsepsratesa_first=(oneqsepsratesa[1]+oneqsepsratesa[2]+oneqsepsratesa[3]+oneqsepsratesa[4])/4 +by cellid: generate oneqsepsratesa_last=(oneqsepsratesa[_N]+oneqsepsratesa[_N-1]+oneqsepsratesa[_N-2]+oneqsepsratesa[_N-3])/4 +by cellid: generate hireratesa_first=(hireratesa[1]+hireratesa[2]+hireratesa[3]+hireratesa[4])/4 +by cellid: generate hireratesa_last=(hireratesa[_N]+hireratesa[_N-1]+hireratesa[_N-2]+hireratesa[_N-3])/4 + +by cellid: keep if _n==1 + +input str16 ind_label +"Agric" +"Mining" +"Utilities" +"Const" +"Manuf" +"Wholesale" +"Retail" +"Transport" +"Infor" +"FIRE" +"RealEst" +"ProfServ" +"Manag" +"Admin" +"Educ" +"Health" +"Arts" +"AccomRest" +"Other" + + +graph twoway (scatter oneqsepsratesa_last oneqsepsratesa_first in 1/19, mlabel(ind_label) xtitle("1999 One quarter incidence rate (q{sub:1})") ytitle("2017 One quarter incidence rate (q{sub:1})")) (function y=x, range(0 .3) lcolor(black) legend(off)) +graph rename oneqseps_firstlast_industry, replace +graph export oneqseps_firstlast_industry.pdf, name(oneqseps_firstlast_industry) as(pdf) replace + +graph twoway (scatter hireratesa_last hireratesa_first in 1/19, mlabel(ind_label) xtitle("1999 Hires rate (h)") ytitle("2017 Hires rate (h)")) (function y=x, range(0 .5) lcolor(black) legend(off)) +graph rename hirerate_firstlast_industry, replace +graph export hirerate_firstlast_industry.pdf, name(hirerate_firstlast_industry) as(pdf) replace diff --git a/16/replication_package/programs/shortjobs_main.m b/16/replication_package/programs/shortjobs_main.m new file mode 100644 index 0000000000000000000000000000000000000000..ad6079f5aa948d8f7c3605dfb75386e697590b7a --- /dev/null +++ b/16/replication_package/programs/shortjobs_main.m @@ -0,0 +1,459 @@ +clc; +clear all; +close all; + +%% Set values for parameters that never change + +global pigrdpts pigrid pigriddiv yb yg beta b gam eta pkh lam alph pi0 kh sigeps A kr + +% grid for \pi +pigrdpts=1500; +pigrdwidth=1/pigrdpts; +pilo=0; +pihi=1; +% values of pigrid represent the "midpoint" of a particular gridpoint, and +% values pigriddiv represent the "dividing point" between two successive +% gridpoints. +pigriddiv=(pilo:pigrdwidth:pihi); % dividing points between gridpoint ranges +pigrid=(pilo+pigrdwidth/2:pigrdwidth:pihi-pigrdwidth/2); + +yb=.4; % productivity of bad match +yg=1; % productivity of good match +beta=.96^(1/52); % 4 percent annual discount rate (period is a week) +b=.4; % flow value of leisure +gam=0.5; % elasticity of matches wrt unemp +eta=0.5; % workers' barg power +pkh=1/52; % hazard rate for ending of start-up costs + +options=optimset('TolFun',1e-12,'Display','none'); % set convergence tolerance for fsolve + +% parameters in 'solvemodel' function that we will want to access in this program +global pe pf u e0 e1 w0 w1 tendist probmatch probg H_pi_dist pibar theta oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur + + + +% % Baseline results with pi0=0.40 (results for pi0=0.38, shown in the +% Appendix, are derived further below) + +%% Exercises that hold pi0 and kh fixed + +pi0=0.4; % prior that y=y_g +kh=0.11; % training/start-up costs + +% 1999 calibration +alph=0.146; +lam=0.0085; + +startvals=[0.809; 0.232; 0.813]; % starting values for [sigeps; A; kr] (chosen here with knowledge of solution, based on having previously solved) +targets=[0.419; 0.486; 22.7/7]; % targeted values for probg, jfr, and meanvacdur (1999) + +[Params1999, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 1999 values of sigeps, A, and kr +Params1999 + +disp('Calculations for Table 4') + +% % Table 4: The model's 1999 moments are calculated and displayed here + +% 1999 values of model moments +disp('1999 values of model moments') +stats1999=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% 2017 calibration +alph=0.124; +lam=0.0068; +startvals=[0.555; 0.197; 0.951]; % starting values for sigeps, A, and kr +targets=[0.463; 0.364; 28.1/7]; % targeted values for probg, jfr, and meanvacdur (2017) + +disp('Calculations for Table 5') + +% Solve for parameters +[Params2017a, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 2017 values of sigeps, A, and kr +disp('Calibrated values of sigeps, A, and kr:') +Params2017a + +% show the 2017 model moments +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +disp('Calculations for Table 6') + +% % Table 6 results: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% change kr +solvemodel([Params1999(1); Params1999(2); Params2017a(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] +disp('Changes due to change in kr:') +stats2017-stats1999 + +% change A +solvemodel([Params1999(1); Params2017a(2); Params1999(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel(Params1999, targets, 1, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel(Params1999, targets, 1, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change sigeps +solvemodel([Params2017a(1); Params1999(2); Params1999(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in sigeps:') +stats2017-stats1999 + + + +%% Exercises that hold sigeps and kh fixed + +% Note that there is no need here to re-do anything for the 1999 +% calibration. These exercises are just re-doing the 2017 calibration under +% the assumption that now pi0, rather than sigeps, is allowed to vary. + +sigeps=0.8088; % fix this at the 1999 calibrated value +kh=0.11; + +% 2017 calibration +alph=0.124; +lam=0.0068; +startvals=[0.452; 0.169; 0.951]; % starting values for pi0, A, and kr +targets=[0.463; 0.364; 28.1/7]; % targeted values for probg, jfr, and meanvacdur (2017) + +% Solve for parameters, and show the 2017 model moments +[Params2017b, fval]=fsolve(@(x) solvemodel(x, targets, 2, 0), startvals, options); % note: the third argument here is 2, indicating that the three free parameters are pi0, A, and kr + +disp('Calculations for Table 7') + +% reveal the calibrated 2017 values of pi0, A, and kr +disp('Calibrated values of pi0, A, and kr:') +Params2017b + +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% % Table 7 results: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% note: here the first parameter is pi0, so need to set it to its 1999 value +% of 0.4 + +% change kr +solvemodel([0.4; Params1999(2); Params2017b(3)],targets, 2, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in kr:') +stats2017-stats1999 + +% change A +solvemodel([0.4; Params2017b(2); Params1999(3)],targets, 2, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel([0.4; Params1999(2); Params1999(3)], targets, 2, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel([0.4; Params1999(2); Params1999(3)], targets, 2, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change pi0 +solvemodel([Params2017b(1); Params1999(2); Params1999(3)],targets, 2, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in pi0:') +stats2017-stats1999 + + + +%% Exercises that hold pi0 and kr fixed + +pi0=0.4; +kr=.8141; % fix this at the 1999 calibrated value + +% 2017 calibration +alph=.124; +lam=.0068; +startvals=[0.650; 0.202; 0.345]; % starting values for sigeps, A, and kh +targets=[.463; .364; 28.1/7]; + +[Params2017c, fval]=fsolve(@(x) solvemodel(x, targets, 3, 0), startvals, options); % note: the third argument here is 3, indicating that the three free parameters are pi0, A, and kh + +disp('Calculations for Table 8') + +% reveal the calibrated 2017 values of pi0, A, and kh +disp('Calibrated values of pi0, A, and kh:') +Params2017c + +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% % Table 8 results: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% note: here the third parameter is kh, so need to set it to its 1999 value +% of 0.11 + +% change kh + +solvemodel([Params1999(1); Params1999(2); Params2017c(3)], targets, 3, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in kh:') +stats2017-stats1999 + +% change A +solvemodel([Params1999(1); Params2017c(2); 0.11],targets, 3, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel([Params1999(1); Params1999(2); 0.11], targets, 3, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel([Params1999(1); Params1999(2); 0.11], targets, 3, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change sigeps +solvemodel([Params2017c(1); Params1999(2); 0.11],targets, 3, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in sigeps:') +stats2017-stats1999 + + + +%% Appendix. Re-do the exercises, but with a baseline value of pi0=0.38 (version of model in which sigeps, A, and kr can change) + +disp('Calculations for the table in the Appendix') + +pi0=0.38; % prior that y=y_g +kh=0.11; % training/start-up costs + +% 1999 calibration +alph=0.146; +lam=0.0085; + +startvals=[0.691; 0.249; 0.813]; % starting values for [sigeps; A; kr] (chosen here with knowledge of solution, based on having previously solved) +targets=[0.419; 0.486; 22.7/7]; % targeted values for probg, jfr, and meanvacdur (1999) + +[Params1999, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 1999 values of sigeps, A, and kr +Params1999 + +% 1999 values of model moments +disp('1999 values of model moments') +stats1999=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% 2017 calibration +alph=0.124; +lam=0.0068; +startvals=[0.515; 0.210; 0.951]; % starting values for sigeps, A, and kr +targets=[0.463; 0.364; 28.1/7]; % targeted values for probg, jfr, and meanvacdur (2017) + +% Solve for parameters, and show the 2017 model moments +[Params2017d, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 2017 values of sigeps, A, and kr +disp('Calibrated values of sigeps, A, and kr:') +Params2017d + +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% % Panel B: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% change kr +solvemodel([Params1999(1); Params1999(2); Params2017d(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] +disp('Changes due to change in kr:') +stats2017-stats1999 + +% change A +solvemodel([Params1999(1); Params2017d(2); Params1999(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel(Params1999, targets, 1, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel(Params1999, targets, 1, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change sigeps +solvemodel([Params2017d(1); Params1999(2); Params1999(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in sigeps:') +stats2017-stats1999 + + + +%% Code for calculating mean wages and mean wages at different tenure + +% Before running the code that calculates average wages, we +% first need to solve a version of the model, so as to determine the +% equilibrium values of the variables needed to calculate those averages +% wages, such as probmatch, pe, pf, etc. + +% These are the versions of the model that must be solved in order to +% calculate the statistics reported in subsection 5.5. Do them one by one, +% calculating the averages wages each time. + +disp('Calculations for section 5.5') + +% Calculations in third paragraph of section 5.5 + +pi0=0.4; % reset to value from baseline parameterization. + +% % 1999 +alph=0.146; lam=0.0085; +solvemodel(Params1999, targets, 1, 0); +calculate_mean_wages +q1wages1999=mean_wages_first_qtr; +y5wages1999=mean_wages_fifth_year; + +% % 2017 +alph=0.124; lam=0.0068; +solvemodel(Params2017a, targets, 1, 0); +calculate_mean_wages +q1wages2017=mean_wages_first_qtr; +y5wages2017=mean_wages_fifth_year; + +disp('Percentage change in first-quarter mean wages') +q1wages2017/q1wages1999-1 + +disp('Percentage change in first-quarter/fifth-year ratio') +(q1wages2017/y5wages2017)/(q1wages1999/y5wages1999)-1 + +% Calculations for fourth paragraph of section 5.5 + +% % 2017 value for sigeps, 1999 for all others +alph=0.146; lam=0.0085; +solvemodel([Params2017a(1); Params1999(2); Params1999(3)], targets, 1, 0); +calculate_mean_wages +q1wages2017=mean_wages_first_qtr; +y5wages2017=mean_wages_fifth_year; + +disp('Percentage change in first-quarter mean wages') +q1wages2017/q1wages1999-1 + +disp('Percentage change in first-quarter/fifth-year ratio') +(q1wages2017/y5wages2017)/(q1wages1999/y5wages1999)-1 + +% Calculations for fifth paragraph of section 5.5 + +solvemodel(Params2017c, targets, 3, 0); +calculate_mean_wages + +disp('first-quarter wages in 1999') +q1wages1999 + +disp('first-quarter wages in 2017') +q1wages2017=mean_wages_first_qtr + +disp('Percentage change in first-quarter mean wages') +q1wages2017/q1wages1999-1 + +disp('fifth-year wages in 1999') +y5wages1999 + +disp('fifth-year wages in 2017') +y5wages2017=mean_wages_fifth_year + +disp('Percentage change in fifth-year mean wages') +y5wages2017/y5wages1999-1 + + + + + + + diff --git a/16/replication_package/programs/shortjobs_national.do b/16/replication_package/programs/shortjobs_national.do new file mode 100644 index 0000000000000000000000000000000000000000..4ede0a9165d73d4e7e48259520feeaf9cadd10b8 --- /dev/null +++ b/16/replication_package/programs/shortjobs_national.do @@ -0,0 +1,263 @@ +set more off +clear + +// cd "H:\My Drive\Research\ShortJobs\AEJM\Final" + +** Extract the data from the raw qwi files (comment out this next line if the qwisa.dta data file has already been created) + +qui do shortjobs_qwisa + +use qwisa, replace + +drop if agegrp=="A00" +drop if sex==0 +keep if industry == "00" +drop industry + +**Generate variables of interest + +sort geography sex agegrp year quarter +egen cellid=group(year quarter) + +** aggregate over geography, sex, age + +bysort cellid: egen allhira=total(hira) // hires in the quarter +bysort cellid: egen allhiras=total(hiras) // "stable" hires, workers in second quarter of employment +bysort cellid: egen allhiraend=total(hiraend) // all hires that also survive into second quarter +bysort cellid: egen allemp=total(emp) // beginning of quarter employment (had earnings last quarter and this quarter) +bysort cellid: egen allempend=total(empend) // end of quarter employment (have earnings this quarter and next quarter) +bysort cellid: egen allemptot=total(emptotal) // total count of people employed in the quarter +bysort cellid: egen allsep=total(sep) // total separations +bysort cellid: egen allsepbeg=total(sepbeg) // total separations of employment spells that existed in previous quarter + +bysort cellid: keep if _n==1 +drop geography sex agegrp + +generate employ=(allemp+allempend)/2 + +generate oneqsepsrate1=(allhira-allhiraend)/employ // spells that begin and end in the same quarter, as fraction of average of beginning and end employment + +generate oneqsepsrate=(allhira-allhiraend)/allemptot // spells that begin and end in the same quarter, as fraction of total count of employment spells in the quarter + +generate oneqhazrate=(allhira-allhiraend)/allhira // fraction of all hires in the quarter that also end in the quarter + +generate twoplussepsrate=(allsepbeg)/allemptot //separations among spells with 2+ quarters of tenure, as fraction total count of employment spells in the quarter + +generate twoplushazrate=(allsepbeg)/(allemptot-allhira) //separations among spells with 2+ quarters of tenure, as fraction of all such spells + +tsset time +generate twoqsepsrate=(L.allhiraend-allhiras)/allemptot //spells that separate by end of second quarter (all that started two quarters ago, minus the ones that we know continue past current quarter), as fraction of total count emp spells in quarter + +generate twoqhazrate=(L.allhiraend-allhiras)/L.allhiraend // spells that separate by end of second quarter, as fraction of spells that have lasted two quarters + +generate threeplussepsrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/allemptot //separations among spells that have lasted three or more quarters, as fraction of total count of employment spells in the quarter + +generate threeplushazrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/(allemptot-L.allhiraend-allhira) //separations among spells that have lasted three or more quarters, as fraction of all such spells + +generate threeplusincidence=(allemptot-L.allhiraend-allhira)/allemptot + +generate onetworate= (L.allhira-allhiras)/allemptot // spells that end after one or two quarters, as fraction of total count of employment spells in the quarter + +generate oneqseps=(allhira-allhiraend) + +generate twoqseps=(L.allhiraend-allhiras) + +generate threeplusqseps=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend)) + +generate hirerate1=allhira/employ // hires as a fraction of average of beginning and end employment + +generate hirerate=allhira/allemptot // hires as a fraction of total count of employment spells in the quarter + +generate sepsrate=allsep/allemptot // separations as a fraction of total count of employment spells in the quarter + +drop if time<=1998*4+4 | time>2018*4 + +** Note that for the variables that use lags, we will need to truncate the first couple of periods, since the lags don't exist for some states prior to 1998Q3 + + +**Seasonally adjust by regressing on quarterly dummies + +set matsize 2000 + +quietly{ +generate oneqsepsrate1sa=. +generate oneqsepsratesa=. +generate oneqhazratesa=. +generate twoplussepsratesa=. +generate twoplushazratesa=. +generate twoqsepsratesa=. +generate twoqhazratesa=. +generate threeplussepsratesa=. +generate threeplushazratesa=. +generate threeplusincidencesa=. +generate onetworatesa=. +generate sepsratesa=. +generate oneqsepssa=. +generate twoqsepssa=. +generate threeplusqsepssa=. +generate hirerate1sa=. +generate hireratesa=. + +egen oneqsepsrate1means=mean(oneqsepsrate1) +egen oneqsepsratemeans=mean(oneqsepsrate) +egen oneqhazratemeans=mean(oneqhazrate) +egen twoplussepsratemeans=mean(twoplussepsrate) +egen twoplushazratemeans=mean(twoplushazrate) +egen twoqsepsratemeans=mean(twoqsepsrate) +egen twoqhazratemeans=mean(twoqhazrate) +egen threeplussepsratemeans=mean(threeplussepsrate) +egen threeplushazratemeans=mean(threeplushazrate) +egen threeplusincidencemeans=mean(threeplusincidence) +egen onetworatemeans=mean(onetworate) +egen sepsratemeans=mean(sepsrate) +egen oneqsepsmeans=mean(oneqseps) +egen twoqsepsmeans=mean(twoqseps) +egen threeplusqsepsmeans=mean(threeplusqseps) +egen hirerate1means=mean(hirerate1) +egen hireratemeans=mean(hirerate) + + reg oneqsepsrate1 i.quarter + predict double sa, residual + replace oneqsepsrate1sa=sa+oneqsepsrate1means + drop sa + reg oneqsepsrate i.quarter + predict double sa, residual + replace oneqsepsratesa=sa+oneqsepsratemeans + drop sa + reg oneqhazrate i.quarter + predict double sa, residual + replace oneqhazratesa=sa+oneqhazratemeans + drop sa + reg twoplussepsrate i.quarter + predict double sa, residual + replace twoplussepsratesa=sa+twoplussepsratemeans + drop sa + reg twoplushazrate i.quarter + predict double sa, residual + replace twoplushazratesa=sa+twoplushazratemeans + drop sa + reg twoqsepsrate i.quarter + predict double sa, residual + replace twoqsepsratesa=sa+twoqsepsratemeans + drop sa + reg twoqhazrate i.quarter + predict double sa, residual + replace twoqhazratesa=sa+twoqhazratemeans + drop sa + reg threeplussepsrate i.quarter + predict double sa, residual + replace threeplussepsratesa=sa+threeplussepsratemeans + drop sa + reg threeplushazrate i.quarter + predict double sa, residual + replace threeplushazratesa=sa+threeplushazratemeans + drop sa + reg threeplushazrate i.quarter + predict double sa, residual + replace threeplusincidencesa=sa+threeplusincidencemeans + drop sa + reg onetworate i.quarter + predict double sa, residual + replace onetworatesa=sa+onetworatemeans + drop sa + reg sepsrate i.quarter + predict double sa, residual + replace sepsratesa=sa+sepsratemeans + drop sa + reg oneqseps i.quarter + predict double sa, residual + replace oneqsepssa=sa+oneqsepsmeans + drop sa + reg twoqseps i.quarter + predict double sa, residual + replace twoqsepssa=sa+twoqsepsmeans + drop sa + reg threeplusqseps i.quarter + predict double sa, residual + replace threeplusqsepssa=sa+threeplusqsepsmeans + drop sa + reg hirerate1 i.quarter + predict double sa, residual + replace hirerate1sa=sa+hirerate1means + drop sa + reg hirerate i.quarter + predict double sa, residual + replace hireratesa=sa+hireratemeans + drop sa +} + +graph twoway line hireratesa sepsratesa date, xscale(range(1999 2017)) xtitle("Year") xlabel(2000(5)2015) legend(cols(1) label(1 "h{sub:t}") label(2 "s{sub:t}") ring(0) bplacement(2)) +graph rename hire_sep_graph, replace +graph export hire_sep_graph.pdf, name(hire_sep_graph) as(pdf) replace + +graph twoway line hireratesa date if time>=8001, xtitle("Year") xlabel(2000(5)2015) legend(cols(1) label(1 "h{sub:t}") ring(0) bplacement(2)) +graph rename hiresrate_graph, replace +graph export hiresrate_graph.pdf, name(hiresrate_graph) as(pdf) replace + +graph twoway line oneqhazratesa date if time>=8001, xtitle("Year") xlabel(2000(5)2015) legend(cols(1) label(1 "{&delta}{sub:1t}") ring(0) bplacement(2)) +graph rename oneqhazrate_graph, replace +graph export oneqhazrate_graph.pdf, name(oneqhazrate_graph) as(pdf) replace + +graph twoway line oneqsepsrate oneqsepsratesa date, xtitle("Year") xlabel(2000(5)2015) xscale(range(1999 2017)) xtitle("Year") legend(cols(1) label(1 "q{sub:1t}") label(2 "q{sub:1t}, seasonally adjusted") ring(0) bplacement(2)) +graph rename seasonal_one_graph, replace +graph export seasonal_one_graph.pdf, name(seasonal_one_graph) as(pdf) replace + +graph twoway line twoqsepsrate twoqsepsratesa date, xtitle("Year") xlabel(2000(5)2015) xscale(range(1999 2017)) xtitle("Year") legend(cols(1) label(1 "q{sub:2t}") label(2 "q{sub:2t}, seasonally adjusted") ring(0) bplacement(2)) +graph rename seasonal_two_graph, replace +graph export seasonal_two_graph.pdf, name(seasonal_two_graph) as(pdf) replace + +graph twoway line oneqhazratesa twoqhazratesa threeplushazratesa date, xtitle("Year") xlabel(2000(5)2015) yscale(range(0 .4)) legend(cols(1) label(1 "{&delta}{sub:1t}") label(2 "{&delta}{sub:2t}") label(3 "{&delta}{sub:3t}") ring(0) bplacement(3)) +graph rename allthreehazrates_graph, replace +graph export allthreehazrates_graph.pdf, name(allthreehazrates_graph) replace + +generate onetwoqsepsrate=oneqsepsratesa+twoqsepsratesa +generate onetwothreesepsrate=oneqsepsratesa+twoqsepsratesa+threeplussepsratesa +generate twothreeqsepsrate=threeplussepsratesa+twoqsepsratesa +graph twoway area onetwothreesepsrate twothreeqsepsrate threeplussepsratesa date, xtitle("Year") xlabel(2000(5)2015)yscale(range(0 .25)) legend(cols(1) label(1 "One quarter") label(2 "Two quarters") label(3 "Three or more") ring(0) bplacement(2)) +graph rename sepsratestack_graph, replace +graph export sepsratestack_graph.pdf, name(sepsratestack_graph) replace + + +** Produce the statistics reported throughout the text, and in Tables 1 and 2 + +sort time + +generate sepsratesa_beg=(sepsratesa[1]+sepsratesa[2]+sepsratesa[3]+sepsratesa[4])/4 +generate sepsratesa_end=(sepsratesa[_N]+sepsratesa[_N-1]+sepsratesa[_N-2]+sepsratesa[_N-3])/4 +generate oneqsepsratesa_beg=(oneqsepsratesa[1]+oneqsepsratesa[2]+oneqsepsratesa[3]+oneqsepsratesa[4])/4 +generate oneqsepsratesa_end=(oneqsepsratesa[_N]+oneqsepsratesa[_N-1]+oneqsepsratesa[_N-2]+oneqsepsratesa[_N-3])/4 +generate twoqsepsratesa_beg=(twoqsepsratesa[1]+twoqsepsratesa[2]+twoqsepsratesa[3]+twoqsepsratesa[4])/4 +generate twoqsepsratesa_end=(twoqsepsratesa[_N]+twoqsepsratesa[_N-1]+twoqsepsratesa[_N-2]+twoqsepsratesa[_N-3])/4 +generate threeplussepsratesa_beg=(threeplussepsratesa[1]+threeplussepsratesa[2]+threeplussepsratesa[3]+threeplussepsratesa[4])/4 +generate threeplussepsratesa_end=(threeplussepsratesa[_N]+threeplussepsratesa[_N-1]+threeplussepsratesa[_N-2]+threeplussepsratesa[_N-3])/4 + +generate sepsratesa_change=sepsratesa_end-sepsratesa_beg +generate oneqsepsratesa_change=oneqsepsratesa_end-oneqsepsratesa_beg +generate twoqsepsratesa_change=twoqsepsratesa_end-twoqsepsratesa_beg +generate threeplussepsratesa_change=threeplussepsratesa_end-threeplussepsratesa_beg + +** Numbers mentioned in Introduction, second paragraph + +disp oneqsepsratesa_beg oneqsepsratesa_end sepsratesa_beg sepsratesa_end + +generate oneqhazratesa_beg=(oneqhazratesa[1]+oneqhazratesa[2]+oneqhazratesa[3]+oneqhazratesa[4])/4 +generate oneqhazratesa_end=(oneqhazratesa[_N]+oneqhazratesa[_N-1]+oneqhazratesa[_N-2]+oneqhazratesa[_N-3])/4 +generate twoqhazratesa_beg=(twoqhazratesa[1]+twoqhazratesa[2]+twoqhazratesa[3]+twoqhazratesa[4])/4 +generate twoqhazratesa_end=(twoqhazratesa[_N]+twoqhazratesa[_N-1]+twoqhazratesa[_N-2]+twoqhazratesa[_N-3])/4 +generate threeplushazratesa_beg=(threeplushazratesa[1]+threeplushazratesa[2]+threeplushazratesa[3]+threeplushazratesa[4])/4 +generate threeplushazratesa_end=(threeplushazratesa[_N]+threeplushazratesa[_N-1]+threeplushazratesa[_N-2]+threeplushazratesa[_N-3])/4 +generate hireratesa_beg=(hireratesa[1]+hireratesa[2]+hireratesa[3]+hireratesa[4])/4 +generate hireratesa_end=(hireratesa[_N]+hireratesa[_N-1]+hireratesa[_N-2]+hireratesa[_N-3])/4 + +generate oneqhazratesa_change=oneqhazratesa_end-oneqhazratesa_beg +generate twoqhazratesa_change=twoqhazratesa_end-twoqhazratesa_beg +generate threeplushazratesa_change=threeplushazratesa_end-threeplushazratesa_beg +generate hireratesa_change=hireratesa_end-hireratesa_beg + +** Table 1 + +disp oneqhazratesa_beg twoqhazratesa_beg threeplushazratesa_beg hireratesa_beg + +** Table 2 + +disp oneqhazratesa_change twoqhazratesa_change threeplushazratesa_change hireratesa_change \ No newline at end of file diff --git a/16/replication_package/programs/shortjobs_qwi_fs.do b/16/replication_package/programs/shortjobs_qwi_fs.do new file mode 100644 index 0000000000000000000000000000000000000000..8b8894562d25bb09a40174f8a3f8862dfbd7bed4 --- /dev/null +++ b/16/replication_package/programs/shortjobs_qwi_fs.do @@ -0,0 +1,36 @@ +** This do-file reads in the raw "fs" (firm-size) data for each of the 30 states, keeps the variables of interest, and saves the dataset in a file called qwisa.dta +local statelist "ca co ct fl ga hi id il in ks la md me mn mo mt nc nd nj nm nv pa ri sc sd tn tx va wa wv" + +quietly{ + +foreach state in `statelist' { + + clear + + import delimited using "`c(pwd)'\R2019q3\qwi_`state'_sa_fs_gs_ns_op_u.csv" + + keep geography industry sex agegrp year quarter emp empend emptotal hira hiraend hiras sep sepbeg firmsize + + if "`state'"=="ca"{ + compress + save qwi_fs, replace + } + else{ + compress + append using qwi_fs + save qwi_fs, replace + } + } +} + +clear +use qwi_fs + +sort geography firmsize year quarter + +generate date=year+quarter/4 + +generate int time=year*4+quarter + +save qwi_fs, replace + diff --git a/16/replication_package/programs/shortjobs_qwisa.do b/16/replication_package/programs/shortjobs_qwisa.do new file mode 100644 index 0000000000000000000000000000000000000000..1d2c5655c4c55bbecf9dc599421c42422ba67414 --- /dev/null +++ b/16/replication_package/programs/shortjobs_qwisa.do @@ -0,0 +1,38 @@ +** This do-file reads in the raw "sa" (sex-age)data for each of the 30 states, keeps the variables of interest, and saves the dataset in a file called qwisa.dta + +local statelist "ca co ct fl ga hi id il in ks la md me mn mo mt nc nd nj nm nv pa ri sc sd tn tx va wa wv" + +quietly{ + +foreach state in `statelist' { + + clear + + import delimited using "`c(pwd)'\R2019q3\qwi_`state'_sa_f_gs_ns_op_u.csv" + + keep geography industry sex agegrp year quarter emp empend emptotal hira hiraend hiras sep sepbeg + + ** For the first state, "ca," we create the qwisa.dta file, and for all others we append to it + if "`state'"=="ca"{ + compress + save qwisa, replace + } + else{ + compress + append using qwisa + save qwisa, replace + } + } +} + +clear +use qwisa + +sort geography sex agegrp year quarter + +generate date=year+(quarter-1)/4 + +generate int time=year*4+quarter + +save qwisa, replace + diff --git a/16/replication_package/programs/shortjobs_reduced_form.m b/16/replication_package/programs/shortjobs_reduced_form.m new file mode 100644 index 0000000000000000000000000000000000000000..aa1c2b057a3f304218d25252c18d82fa8d484e34 --- /dev/null +++ b/16/replication_package/programs/shortjobs_reduced_form.m @@ -0,0 +1,58 @@ +% This code carries out the exercises in Section 4 ("reduced form +% exercises") + +clc; +clear all; +close all; + +global delta1 delta2 delta3 hirerate + +opts=optimset('TolFun',1e-16); + +startvals=[.5; .14; .008]; % starting values for pigood, alph, and lam + +disp('**********Table 1***********') + +% 1999 +targets=[.387, .383, .112]; +[X, fval]=fminsearch(@(x) moments(x,targets), startvals, opts); + +pigood1999=round(X(1),3) +alph1999=round(X(2),3) +lam1999=round(X(3),4) + +moments([pigood1999; alph1999; lam1999]); + +disp('1999 values of delta1 delta2 delta3 hirerate') +[round(delta1, 3) round(delta2, 3) round(delta3, 3) round(hirerate, 3)] + +disp('*********Table 2************') + +% 2017 +targets=[.327, .343, .092]; +[X, fval]=fminsearch(@(x) moments(x,targets), startvals, opts); + +pigood2017=round(X(1),3) +alph2017=round(X(2),3) +lam2017=round(X(3),4) + +moments([pigood2017; alph2017; lam2017]); + +disp('Row 2: changes in 2017 values of delta1, delta2, delta3, and hirerate, relative to 1999 model value') +[round(delta1-0.387,3) round(delta2-0.383, 3) round(delta3-0.112, 3) round(hirerate-0.200, 3)] + +moments([pigood2017; alph1999; lam1999]); + +disp('Row 3: changes in values of delta1, delta2, delta3, and hirerate, when only pigood changes') +[round(delta1-0.387,3) round(delta2-0.383, 3) round(delta3-0.112, 3) round(hirerate-0.200, 3)] + + +moments([pigood1999; alph2017; lam1999]); + +disp('Row 4: changes in values of delta1, delta2, delta3, and hirerate, when only alph changes') +[round(delta1-0.387,3) round(delta2-0.383, 3) round(delta3-0.112, 3) round(hirerate-0.200, 3)] + +moments([pigood1999; alph1999; lam2017]); + +disp('Row 5: changes in values of delta1, delta2, delta3, and hirerate, when only lam changes') +[round(delta1-0.387,3) round(delta2-0.383, 3) round(delta3-0.112, 3) round(hirerate-0.200, 3)] \ No newline at end of file diff --git a/16/replication_package/programs/shortjobs_sex_age.do b/16/replication_package/programs/shortjobs_sex_age.do new file mode 100644 index 0000000000000000000000000000000000000000..1368d3c5a3c1d95535191c5af4535be5ae76ca9f --- /dev/null +++ b/16/replication_package/programs/shortjobs_sex_age.do @@ -0,0 +1,186 @@ +set more off + +clear + +// cd "H:\My Drive\Research\ShortJobs\AEJM\Revision" + +**Extract the data from the raw qwi files (comment out this next line if the qwisa.dta data file has already been created) +//qui do shortjobs_qwisa + +use qwisa, replace + +drop if sex == 0 +drop if agegrp=="A00" +keep if industry=="00" +drop industry + +**Generate variables of interest + +sort geography sex agegrp year quarter + +egen cell=group(sex agegrp year quarter) + +** aggregate over geography +bysort cell: egen allhira=total(hira) // hires in the quarter +bysort cell: egen allhiras=total(hiras) // "stable" hires, workers in second quarter of employment +bysort cell: egen allhiraend=total(hiraend) // all hires that also survive into second quarter +bysort cell: egen allemp=total(emp) // beginning of quarter employment (had earnings last quarter and this quarter) +bysort cell: egen allempend=total(empend) // end of quarter employment (have earnings this quarter and next quarter) +bysort cell: egen allemptot=total(emptotal) // total count of people employed in the quarter +bysort cell: egen allsep=total(sep) // total separations +bysort cell: egen allsepbeg=total(sepbeg) // total separations of employment spells that existed in previous quarter + +bysort cell: keep if _n==1 +drop geography + +egen cellid=group(sex agegrp) + +generate employ=(allemp+allempend)/2 + +generate oneqsepsrate1=(allhira-allhiraend)/employ // spells that begin and end in the same quarter, as fraction of average of beginning and end employment + +generate oneqsepsrate=(allhira-allhiraend)/allemptot // spells that begin and end in the same quarter, as fraction of total count of employment spells in the quarter + +generate oneqhazrate=(allhira-allhiraend)/allhira // fraction of all hires in the quarter that also end in the quarter + +generate twoplussepsrate=(allsepbeg)/allemptot //separations among spells with 2+ quarters of tenure, as fraction total count of employment spells in the quarter + +generate twoplushazrate=(allsepbeg)/(allemptot-allhira) //separations among spells with 2+ quarters of tenure, as fraction of all such spells + +xtset cellid time +generate twoqsepsrate=(L.allhiraend-allhiras)/allemptot //spells that separate by end of second quarter (all that started two quarters ago, minus the ones that we know continue past current quarter), as fraction of total count emp. spells in quarter + +generate twoqhazrate=(L.allhiraend-allhiras)/L.allhiraend // spells that separate by end of second quarter, as fraction of spells that have lasted two quarters + +generate threeplussepsrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/allemptot //separations among spells that have lasted three or more quarters, as fraction of total count of employment spells in the quarter + +generate threeplushazrate=(allsep-(L.allhiraend-allhiras)-(allhira-allhiraend))/(allemptot-L.allhiraend-allhira) //separations among spells that have lasted three or more quarters, as fraction of all such spells + +generate sepsrate=allsep/allemptot // overall separation rate + +generate hirerate1=allhira/employ // hires as a fraction of average of beginning and end employment + +generate hirerate=allhira/allemptot // hires as a fraction of total count of employmen spells in the quarter + +drop if time<=1998*4+4 | time>2018*4 + +**Seasonally adjust by regressing on quarterly dummies + +set matsize 2000 + +quietly{ +generate oneqsepsrate1sa=. +generate oneqsepsratesa=. +generate oneqhazratesa=. +generate twoplussepsratesa=. +generate twoplushazratesa=. +generate twoqsepsratesa=. +generate twoqhazratesa=. +generate threeplussepsratesa=. +generate threeplushazratesa=. +generate sepsratesa=. +generate hirerate1sa=. +generate hireratesa=. + +sort cell date +by cell: egen oneqsepsrate1means=mean(oneqsepsrate1) +by cell: egen oneqsepsratemeans=mean(oneqsepsrate) +by cell: egen oneqhazratemeans=mean(oneqhazrate) +by cell: egen twoplussepsratemeans=mean(twoplussepsrate) +by cell: egen twoplushazratemeans=mean(twoplushazrate) +by cell: egen twoqsepsratemeans=mean(twoqsepsrate) +by cell: egen twoqhazratemeans=mean(twoqhazrate) +by cell: egen threeplussepsratemeans=mean(threeplussepsrate) +by cell: egen threeplushazratemeans=mean(threeplushazrate) +by cell: egen sepsratemeans=mean(sepsrate) +by cell: egen hirerate1means=mean(hirerate1) +by cell: egen hireratemeans=mean(hirerate) + +forvalues i=1/16{ // there are 16 sex/age cells + reg oneqsepsrate1 i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsrate1sa=sa+oneqsepsrate1means if cellid==`i' + drop sa + reg oneqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqsepsratesa=sa+oneqsepsratemeans if cellid==`i' + drop sa + reg oneqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace oneqhazratesa=sa+oneqhazratemeans if cellid==`i' + drop sa + reg twoplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplussepsratesa=sa+twoplussepsratemeans if cellid==`i' + drop sa + reg twoplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoplushazratesa=sa+twoplushazratemeans if cellid==`i' + drop sa + reg twoqsepsrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqsepsratesa=sa+twoqsepsratemeans if cellid==`i' + drop sa + reg twoqhazrate i.quarter if cellid==`i' + predict double sa, residual + replace twoqhazratesa=sa+twoqhazratemeans if cellid==`i' + drop sa + reg threeplussepsrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplussepsratesa=sa+threeplussepsratemeans if cellid==`i' + drop sa + reg threeplushazrate i.quarter if cellid==`i' + predict double sa, residual + replace threeplushazratesa=sa+threeplushazratemeans if cellid==`i' + drop sa + reg sepsrate i.quarter if cellid==`i' + predict double sa, residual + replace sepsratesa=sa+sepsratemeans if cellid==`i' + drop sa + reg hirerate1 i.quarter if cellid==`i' + predict double sa, residual + replace hirerate1sa=sa+hirerate1means if cellid==`i' + drop sa + reg hirerate i.quarter if cellid==`i' + predict double sa, residual + replace hireratesa=sa+hireratemeans if cellid==`i' + drop sa + } +} + +save shortjobs_sex_age, replace + +sort cellid time + +by cellid: generate oneqsepsratesa_first=(oneqsepsratesa[1]+oneqsepsratesa[2]+oneqsepsratesa[3]+oneqsepsratesa[4])/4 +by cellid: generate oneqsepsratesa_last=(oneqsepsratesa[_N]+oneqsepsratesa[_N-1]+oneqsepsratesa[_N-2]+oneqsepsratesa[_N-3])/4 +by cellid: generate hireratesa_first=(hireratesa[1]+hireratesa[2]+hireratesa[3]+hireratesa[4])/4 +by cellid: generate hireratesa_last=(hireratesa[_N]+hireratesa[_N-1]+hireratesa[_N-2]+hireratesa[_N-3])/4 + +by cellid: keep if _n==1 + +input str16 age_sex_label +"14-18" +"19-21" +"22-24" +"25-34" +"35-44" +"45-54" +"55-64" +"65-99" +"14-18" +"19-21" +"22-24" +"25-34" +"35-44" +"45-54" +"55-64" +"65-99" + +graph twoway (scatter oneqsepsratesa_last oneqsepsratesa_first if sex==1, mlabel(age_sex_label) mcolor(red) xtitle("1999 One quarter incidence rate (q{sub:1})") ytitle("2017 One quarter incidence rate (q{sub:1})") ) (scatter oneqsepsratesa_last oneqsepsratesa_first if sex==2, mlabel(age_sex_label) mcolor(blue)) (function y=x, range(0 .3) lcolor(black) legend(off)) +graph rename oneqseps_firstlast_sex_age, replace +graph export oneqseps_firstlast_sex_age.pdf, name(oneqseps_firstlast_sex_age) as(pdf) replace + +graph twoway (scatter hireratesa_last hireratesa_first if sex==1, mlabel(age_sex_label) mcolor(red) xtitle("1999 Hires rates (h)") ytitle("2017 Hires rate (h)") ) (scatter hireratesa_last hireratesa_first if sex==2, mlabel(age_sex_label) mcolor(blue)) (function y=x, range(.1 .5) lcolor(black) legend(off)) +graph rename hirerate_firstlast_sex_age, replace +graph export hirerate_firstlast_sex_age.pdf, name(hirerate_firstlast_sex_age) as(pdf) replace diff --git a/16/replication_package/programs/shortjobs_structural.m b/16/replication_package/programs/shortjobs_structural.m new file mode 100644 index 0000000000000000000000000000000000000000..6e69b41bf25bf8e584d19c8f8a5196f24bd52b71 --- /dev/null +++ b/16/replication_package/programs/shortjobs_structural.m @@ -0,0 +1,459 @@ +clc; +clear all; +close all; + +%% Set values for parameters that never change + +global pigrdpts pigrid pigriddiv yb yg beta b gam eta pkh lam alph pi0 kh sigeps A kr + +% grid for \pi +pigrdpts=1500; +pigrdwidth=1/pigrdpts; +pilo=0; +pihi=1; +% values of pigrid represent the "midpoint" of a particular gridpoint, and +% values pigriddiv represent the "dividing point" between two successive +% gridpoints. +pigriddiv=(pilo:pigrdwidth:pihi); % dividing points between gridpoint ranges +pigrid=(pilo+pigrdwidth/2:pigrdwidth:pihi-pigrdwidth/2); + +yb=.4; % productivity of bad match +yg=1; % productivity of good match +beta=.96^(1/52); % 4 percent annual discount rate (period is a week) +b=.4; % flow value of leisure +gam=0.5; % elasticity of matches wrt unemp +eta=0.5; % workers' barg power +pkh=1/52; % hazard rate for ending of start-up costs + +options=optimset('TolFun',1e-12,'Display','none'); % set convergence tolerance for fsolve + +% parameters in 'solvemodel' function that we will want to access in this program +global pe pf u e0 e1 w0 w1 tendist probmatch probg H_pi_dist pibar theta oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur + + +%% % Baseline results with pi0=0.40 (results for pi0=0.38, shown in the +% Appendix, are derived further below) + +% Exercises that hold pi0 and kh fixed + +pi0=0.4; % prior that y=y_g +kh=0.11; % training/start-up costs + +% 1999 calibration +alph=0.146; +lam=0.0085; + +startvals=[0.809; 0.232; 0.813]; % starting values for [sigeps; A; kr] (chosen here with knowledge of solution, based on having previously solved) +targets=[0.419; 0.486; 22.7/7]; % targeted values for probg, jfr, and meanvacdur (1999) + +[Params1999, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 1999 values of sigeps, A, and kr +Params1999 + +disp('Calculations for Table 4') + +% % Table 4: The model's 1999 moments are calculated and displayed here + +% 1999 values of model moments +disp('1999 values of model moments') +stats1999=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% 2017 calibration +alph=0.124; +lam=0.0068; +startvals=[0.555; 0.197; 0.951]; % starting values for sigeps, A, and kr +targets=[0.463; 0.364; 28.1/7]; % targeted values for probg, jfr, and meanvacdur (2017) + +disp('Calculations for Table 5') + +% Solve for parameters +[Params2017a, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 2017 values of sigeps, A, and kr +disp('Calibrated values of sigeps, A, and kr:') +Params2017a + +% show the 2017 model moments +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +disp('Calculations for Table 6') + +% % Table 6 results: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% change kr +solvemodel([Params1999(1); Params1999(2); Params2017a(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in kr:') +stats2017-stats1999 + +% change A +solvemodel([Params1999(1); Params2017a(2); Params1999(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel(Params1999, targets, 1, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel(Params1999, targets, 1, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change sigeps +solvemodel([Params2017a(1); Params1999(2); Params1999(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in sigeps:') +stats2017-stats1999 + + + +%% Exercises that hold sigeps and kh fixed + +% Note that there is no need here to re-do anything for the 1999 +% calibration. These exercises are just re-doing the 2017 calibration under +% the assumption that now pi0, rather than sigeps, is allowed to vary. + +sigeps=0.8088; % fix this at the 1999 calibrated value +kh=0.11; + +% 2017 calibration +alph=0.124; +lam=0.0068; +startvals=[0.452; 0.169; 0.951]; % starting values for pi0, A, and kr +targets=[0.463; 0.364; 28.1/7]; % targeted values for probg, jfr, and meanvacdur (2017) + +% Solve for parameters, and show the 2017 model moments +[Params2017b, fval]=fsolve(@(x) solvemodel(x, targets, 2, 0), startvals, options); % note: the third argument here is 2, indicating that the three free parameters are pi0, A, and kr + +disp('Calculations for Table 7') + +% reveal the calibrated 2017 values of pi0, A, and kr +disp('Calibrated values of pi0, A, and kr:') +Params2017b + +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% % Table 7 results: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% note: here the first parameter is pi0, so need to set it to its 1999 value +% of 0.4 + +% change kr +solvemodel([0.4; Params1999(2); Params2017b(3)],targets, 2, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in kr:') +stats2017-stats1999 + +% change A +solvemodel([0.4; Params2017b(2); Params1999(3)],targets, 2, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel([0.4; Params1999(2); Params1999(3)], targets, 2, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel([0.4; Params1999(2); Params1999(3)], targets, 2, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change pi0 +solvemodel([Params2017b(1); Params1999(2); Params1999(3)],targets, 2, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in pi0:') +stats2017-stats1999 + + + +%% Exercises that hold pi0 and kr fixed + +pi0=0.4; +kr=.8141; % fix this at the 1999 calibrated value + +% 2017 calibration +alph=.124; +lam=.0068; +startvals=[0.650; 0.202; 0.345]; % starting values for sigeps, A, and kh +targets=[.463; .364; 28.1/7]; + +[Params2017c, fval]=fsolve(@(x) solvemodel(x, targets, 3, 0), startvals, options); % note: the third argument here is 3, indicating that the three free parameters are pi0, A, and kh + +disp('Calculations for Table 8') + +% reveal the calibrated 2017 values of sigeps, A, and kh +disp('Calibrated values of sigeps, A, and kh:') +Params2017c + +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% % Table 8 results: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% note: here the third parameter is kh, so need to set it to its 1999 value +% of 0.11 (except for the exercise where it is being changed) + +% change kh + +solvemodel([Params1999(1); Params1999(2); Params2017c(3)], targets, 3, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in kh:') +stats2017-stats1999 + +% change A +solvemodel([Params1999(1); Params2017c(2); 0.11],targets, 3, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel([Params1999(1); Params1999(2); 0.11], targets, 3, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel([Params1999(1); Params1999(2); 0.11], targets, 3, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change sigeps +solvemodel([Params2017c(1); Params1999(2); 0.11],targets, 3, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in sigeps:') +stats2017-stats1999 + + + +%% Appendix. Re-do the exercises, but with a baseline value of pi0=0.38 (version of model in which sigeps, A, and kr can change) + +disp('Calculations for the table in the Appendix') + +pi0=0.38; % prior that y=y_g +kh=0.11; % training/start-up costs + +% 1999 calibration +alph=0.146; +lam=0.0085; + +startvals=[0.691; 0.249; 0.813]; % starting values for [sigeps; A; kr] (chosen here with knowledge of solution, based on having previously solved) +targets=[0.419; 0.486; 22.7/7]; % targeted values for probg, jfr, and meanvacdur (1999) + +[Params1999b, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 1999 values of sigeps, A, and kr +Params1999b + +% 1999 values of model moments +disp('1999 values of model moments') +stats1999=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% 2017 calibration +alph=0.124; +lam=0.0068; +startvals=[0.515; 0.210; 0.951]; % starting values for sigeps, A, and kr +targets=[0.463; 0.364; 28.1/7]; % targeted values for probg, jfr, and meanvacdur (2017) + +% Solve for parameters, and show the 2017 model moments +[Params2017d, fval]=fsolve(@(x) solvemodel(x, targets, 1, 0), startvals, options); + +% reveal the calibrated 2017 values of sigeps, A, and kr +disp('Calibrated values of sigeps, A, and kr:') +Params2017d + +disp('2017 values of model moments:') +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u] + +% % Panel B: The following code shows (changes in) the statistics of +% interest for the decompositions that change parameters one at a time to +% their 2017 values + +alph=0.146; % set alph back to its 1999 value +lam=0.0085; % set lam back to its 1999 value + +% change kr +solvemodel([Params1999b(1); Params1999b(2); Params2017d(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in kr:') +stats2017-stats1999 + +% change A +solvemodel([Params1999b(1); Params2017d(2); Params1999b(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in A:') +stats2017-stats1999 + +% change lam + +lam=0.0068; +solvemodel(Params1999b, targets, 1, 0); +lam=0.0085; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in lam:') +stats2017-stats1999 + +% change alph +alph=0.124; +lam=0.0085; +solvemodel(Params1999b, targets, 1, 0); +alph=0.146; % restore to 1999 value + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in alph:') +stats2017-stats1999 + +% change sigeps +solvemodel([Params2017d(1); Params1999b(2); Params1999b(3)],targets, 1, 0); + +stats2017=[oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur u]; +disp('Changes due to change in sigeps:') +stats2017-stats1999 + + + +%% Calculate mean wages at different tenure + +% Before running the code that calculates average wages, we +% first need to solve a version of the model, so as to determine the +% equilibrium values of the variables needed to calculate those averages +% wages, such as probmatch, pe, pf, etc. + +disp('Calculations for section 5.5') + +% Calculations in third paragraph of section 5.5 + +disp('Third paragraph') + +pi0=0.4; % reset to value from baseline parameterization. + +% % 1999 +alph=0.146; lam=0.0085; +solvemodel(Params1999, targets, 1, 0); +calculate_mean_wages +q1wages1999=mean_wages_first_qtr; +y5wages1999=mean_wages_fifth_year; + +% % 2017 +alph=0.124; lam=0.0068; +solvemodel(Params2017a, targets, 1, 0); +calculate_mean_wages +q1wages2017=mean_wages_first_qtr; +y5wages2017=mean_wages_fifth_year; + +disp('Percentage change in first-quarter mean wages') +q1wages2017/q1wages1999-1 + +disp('Percentage change in first-quarter/fifth-year ratio') +(q1wages2017/y5wages2017)/(q1wages1999/y5wages1999)-1 + +% Calculations for fourth paragraph of section 5.5 + +disp('Fourth paragraph') + +% % 2017 value for sigeps, 1999 for all others +alph=0.146; lam=0.0085; +solvemodel([Params2017a(1); Params1999(2); Params1999(3)], targets, 1, 0); +calculate_mean_wages +q1wages2017=mean_wages_first_qtr; +y5wages2017=mean_wages_fifth_year; + +disp('Percentage change in first-quarter mean wages') +q1wages2017/q1wages1999-1 + +disp('Percentage change in first-quarter/fifth-year ratio') +(q1wages2017/y5wages2017)/(q1wages1999/y5wages1999)-1 + +% Calculations for fifth paragraph of section 5.5 + +solvemodel(Params2017c, targets, 3, 0); +calculate_mean_wages + +disp('first-quarter wages in 1999') +q1wages1999 + +disp('first-quarter wages in 2017') +q1wages2017=mean_wages_first_qtr + +disp('Percentage change in first-quarter mean wages') +round(q1wages2017,3)/round(q1wages1999,3)-1 + +disp('fifth-year wages in 1999') +round(y5wages1999,3) + +disp('fifth-year wages in 2017') +y5wages2017=mean_wages_fifth_year; +round(y5wages2017,3) + +disp('Percentage change in fifth-year mean wages') +round(y5wages2017,3)/round(y5wages1999,3)-1 + + + + + + + diff --git a/16/replication_package/programs/solvemodel.m b/16/replication_package/programs/solvemodel.m new file mode 100644 index 0000000000000000000000000000000000000000..e2e1eb11cbdf43217ced50088f1e1fa1e78dd46d --- /dev/null +++ b/16/replication_package/programs/solvemodel.m @@ -0,0 +1,224 @@ +function Z=solvemodel(x, targs, vers, show) + +% % This function solves the model, given (1) values for the parameters that +% don't change, which are global variables, (2) values for "calibrated" +% parameters, over which the fsolve function is searching, and which are +% passed to this function as the vector 'x'. +% +% The second argument, 'targs,' gives values for the three statistics whose +% values are being targeted by fsolve as part of the calibration exercise. +% The vector of values, 'Z,' that are returned by this function are the +% squared residuals that fsolve seeks to set to zero. +% +% The variable 'vers,' determines which variables are being passed to the +% function in 'x' and which ones are fixed at the global values set in the +% main m-file (as specified below). +% +% For the variable 'show,' a value of 1 tells the function to print the +% values of the various statistics of interest. +% +% + +% parameters: +global pigrdpts pigrid pigriddiv yb yg beta b gam eta pkh lam alph pi0 kh sigeps A kr + +% output or results that we want to be available globally: +global pe pf u e0 e1 w0 w1 tendist probmatch probg H_pi_dist pibar theta oneqhazrate twoqhazrate threeplushazrate hiresrate jfr meanvacdur + +if vers==1 + localpi0=pi0; + localkh=kh; + localsigeps=x(1); + localA=x(2); + localkr=x(3); +elseif vers==2 + localpi0=x(1); + localkh=kh; + localsigeps=sigeps; + localA=x(2); + localkr=x(3); +elseif vers==3 + localpi0=pi0; + localkh=x(3); + localsigeps=x(1); + localA=x(2); + localkr=kr; +end + + +% % Compute the cumulative distribution of pi, conditional on normally +% distributed signal (z). This must be re-computed every time the values +% of sigeps or pi0 change (which is every time that this function is +% called). + +% Find value of z such that pi equals a particular value of pigriddiv +for j=1:pigrdpts+1 + zz(j)=fsolve(@(z) pigriddiv(j)-localpi0*exp(-(z-yg)^2/2/localsigeps^2)/(localpi0*exp(-(z-yg)^2/2/localsigeps^2)+(1-localpi0)*exp(-(z-yb)^2/2/localsigeps^2)), 0, optimoptions('fsolve','TolFun',1e-16,'Display','off')); +end + +% Probabilities of getting a value of pi between two successive values of +% pigriddiv (the range surrounding a value of pigrid) +H_pi_dist(1,:)=localpi0*normcdf(zz(2:end), yg, localsigeps)+(1-localpi0)*normcdf(zz(2:end), yb, localsigeps)-(localpi0*normcdf(zz(1:end-1), yg, localsigeps)+(1-localpi0)*normcdf(zz(1:end-1), yb, localsigeps)); +H_pi_dist(1,:)=H_pi_dist(1,:)/sum(H_pi_dist(1,:)); % normalize, to ensure elements sum to 1 exactly. + + +%% Solve Bellman equations + +xx=1/2000; % adjustment factor for convergence of pe +pe=.2; % initial value for pe + +% Create/initiate value functions +S0old=zeros(1,length(pigrid)); +S1old=zeros(1,length(pigrid)); +Je0old=zeros(1,length(pigrid)); +Je1old=zeros(1,length(pigrid)); +Juold=0; +Ve0old=zeros(1,length(pigrid)); +Ve1old=zeros(1,length(pigrid)); +Vuold=0; +Vu=0; + +difpe=1; +tol=1e-8; +while abs(difpe)>tol + + pf=localA^(1/(1-gam))*pe^((-gam)/(1-gam)); + + difs=1; + while difs>tol + S0new=max(pigrid*(yg-yb)+yb-localkh-b+beta*(1-lam)*(alph*pigrid*(pkh*S1old(end)+(1-pkh)*S0old(end))+(1-alph)*(pkh*S1old+(1-pkh)*S0old))-... + beta*pe*eta*H_pi_dist*S0old',0); + S1new=max(pigrid*(yg-yb)+yb-b+beta*(1-lam)*(alph*pigrid*S1old(end)+(1-alph)*S1old)-... + beta*pe*eta*H_pi_dist*S0old',0); + difs=max(max(abs(S1old-S1new)),max(abs(S0old-S0new))); + S1old=S1new; + S0old=S0new; + end + + peold=pe; + Ju=(-localkr+beta*pf*(1-eta)*H_pi_dist*S0new')/(1-beta); + difpe=Ju; + pe=peold*(1+difpe*xx); % increase worker's finding rate if Ju>0 + +end + +theta=pe/pf; +w0=b+eta*(pigrid*yg+(1-pigrid)*yb-localkh-b+localkr*theta); +w1=b+eta*(pigrid*yg+(1-pigrid)*yb-b+localkr*theta); + +pibar=pigrid(sum(S0new==0)); + +%% Calculate statistics of interest, given the equilibrium pe, pf, and pibar from above + +probmatch=H_pi_dist*(pigrid>pibar)'; % fraction of meetings with high enought pi to form/continue match + +probg=(H_pi_dist/sum(H_pi_dist(pigrid>pibar)))*(pigrid.*(pigrid>pibar))'; % probability that matches are actually good (conditional on having been formed) + +trans=zeros(3,3); % three states: unemployed, unknown type, known good matches + +trans=[1-pe*probmatch lam+(1-lam)*alph*(1-probg) lam;... + pe*probmatch (1-lam)*(1-alph) 0;... + 0 (1-lam)*alph*probg 1-lam]; + +% steady state +mtr=eye(3)-trans; +mtr(3,1:3)=1; +invmtr=inv(mtr); +erg=invmtr(:,3); +u=erg(1); % unemployment +e0=erg(2); % matches of unknown type +e1=erg(3); % matches known to be good + + +% % Calculate the job tenure distribution +% --Allow mass of one unit to enter and the trace the realized tenure +% distribution of that cohort +% --This is equivalent to looking at the point-in-time distribution if one +% unit is allowed to enter each period. The whole distribution would simply +% scale up or down with the size of the mass of entrants. + +tendist=[0;1;0]; +trans1=trans; +trans1(:,1)=0; % don't allow any exits from unemployment after first period, so this just tracks the initial mass of entrants +for i=2:2000 % 2000 periods is 2000/52 (roughly 40) years + tendist(:,i)=trans1*tendist(:,i-1) ; +end + +% fqseps: All separations among jobs newly created in the quarter=(start in first week of quarter and separate within 12 +% periods)+(start in second week of quarter and separate within 11 +% periods)+(start in third week of quarter and separate within 10)+...etc + +fqseps=13*sum(tendist(2:3,1))-sum(tendist(2:3,14))-sum(tendist(2:3,13))-... + sum(tendist(2:3,12))-sum(tendist(2:3,11))-sum(tendist(2:3,10))-... + sum(tendist(2:3,9))-sum(tendist(2:3,8))-sum(tendist(2:3,7))-... + sum(tendist(2:3,6))-sum(tendist(2:3,5))-sum(tendist(2:3,4))-... + sum(tendist(2:3,3))-sum(tendist(2:3,2)); + +% empspells: (Employment among all tenure categories at start of +% quarter)+(new starts in 2nd week)+(new starts in third week)+...+(new +% starts in 13th week) + +empspells=sum(sum(tendist(2:3,:)))+12*sum(tendist(2:3,1)); + +sqrate=fqseps/empspells; % incidence rate of one-quarter spells (q_1 in paper) + +hires=13*sum(tendist(2:3,1)); + +% % First quarter hazard rate: among those who enter a job in a given +% quarter, what fraction have separated by the start of the next quarter? +oneqhazrate=fqseps/hires; + +% Note: we could have used either tendist or scaledtendist in the above +% calculations for sqrate and fqhazrate. Whether they are scaled or not +% doesn't matter much so long as the numerators and denominators are scaled +% equivalently. + +% 2 quarter hazard rate + +twoqseps=sum(sum(tendist(2:3,2:14)))-sum(sum(tendist(2:3,15:27))); +twoqhazrate=twoqseps/sum(sum(tendist(2:3,2:14))); + +% 3+ quarters separation rate + +threeplusseps=sum(sum(tendist(2:3,15:end)))-sum(sum(tendist(2:3,28:end))); +threeplushazrate=threeplusseps/sum(sum(tendist(2:3,15:end))); + +% Quarterly hires rate (# hires in quarter divided by total employment spells) +hiresrate=hires/empspells; + +% Monthly job-finding rate +jfr=pe*probmatch+(1-pe*probmatch)*pe*probmatch +(1-pe*probmatch)^2*pe*probmatch+(1-pe*probmatch)^3*pe*probmatch; % weekly frequency: "month"==4 weeks + +% % Mean vacancy duration in days +% meanvacdur=7*(1/pf/probmatch); + +% Mean vacancy duration in weeks +meanvacdur=(1/pf/probmatch); + +% print output + +if show==1 +% fid=fopen('results.txt','w'); +% fprintf(fid,'Unemployment rate: \t\t\t\t %g\r', u); +% fprintf(fid,'Monthly job-finding rate:\t\t %g\r', jfr); +% fprintf(fid,'Ave. vacancy duration (weeks):\t %g\r', 1/pf/probmatch); +% fprintf(fid,'Prob(good|match):\t\t\t\t %g\r', probg); +% fprintf(fid,'1-H(pi^n):\t\t\t\t\t\t %g\r', probmatch); +% fprintf(fid,'Worker meeting rate:\t\t\t\t %g\r', pe); +% fprintf(fid,'First quarter hazard rate:\t\t %g\r',oneqhazrate); +% fprintf(fid,'Second quarter hazard rate:\t\t %g\r',twoqhazrate); +% fprintf(fid,'3+ quarter hazard rate:\t\t\t %g\r',threeplushazrate); +% fprintf(fid,'Hires rate:\t\t\t\t\t\t %g\r',hiresrate); +% fclose(fid); +% type results.txt + +% print results to be cut-and-pasted into tables in Latex + fid=fopen('results2.txt','w'); + fprintf(fid,'& %.3f & %.3f & %.3f & %.3f & %.3f & %.2f & %.3f', oneqhazrate, twoqhazrate, threeplushazrate, hiresrate, jfr, meanvacdur, u); + fclose(fid); + type results2.txt + + +end + +Z=[(log(targs(1))-log(probg))^2; (log(targs(2))-log(jfr))^2; (log(targs(3))-log(meanvacdur))^2]; diff --git a/16/should_reproduce.txt b/16/should_reproduce.txt new file mode 100644 index 0000000000000000000000000000000000000000..937fc4ba2fade6ceed53a1d9475476d1bebfe53f --- /dev/null +++ b/16/should_reproduce.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa7af4abb9e4ef8012060b9673dc488ab796964128377f772499cf63d5b0ba75 +size 39