Dear all
I have individual longitudinal data. I want to estimate at the industry level ( aggregation and Collapse in Industry) to get the proportion of people on ZHC and the proportion of people in lockdown. I'm not sure what is the best way to do this. Could you help with this?
To be more specific, I want to estimate workers in zero-hours contracts (ZHC) during the lockdown period ( lockdown ) to answer this question ( what happens to ZHC during the lockdown in the industry?
This is my data and the only interesting variables:
I tried this command to Collapse at the industry level :
Then run regression by :
Could you help with that? Is this the correct way to aggregation at the industry level?
I have individual longitudinal data. I want to estimate at the industry level ( aggregation and Collapse in Industry) to get the proportion of people on ZHC and the proportion of people in lockdown. I'm not sure what is the best way to do this. Could you help with this?
To be more specific, I want to estimate workers in zero-hours contracts (ZHC) during the lockdown period ( lockdown ) to answer this question ( what happens to ZHC during the lockdown in the industry?
This is my data and the only interesting variables:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double PERSID long industry1 byte quarter long LGWT20 byte(FLOW SEX) double HOURPAY long ZHC float log_HOURPAY double Lockdown float wdate 970592020102 7 4 10018 3 1 . 0 . 0 44 7990493010102 12 4 7501 3 2 . 0 . 0 43 4230794720101 7 4 1004 3 2 11.83 0 2.470639 0 46 1290892010101 23 4 21860 3 2 . 0 . 0 47 4230291540102 12 4 819 3 2 . 0 . 0 41 1960892020102 13 4 13880 3 1 . 0 . 0 47 3160393040101 12 4 13593 3 1 . 0 . 0 42 9161293010101 10 4 19420 3 2 . 0 . 0 51 600194020101 23 4 10257 3 2 8.51 0 2.141242 0 40 9221092020102 12 4 14481 3 1 . 0 . 0 49 9191092020103 23 4 16392 3 1 . 0 . 0 49 1891393060101 7 4 15634 3 2 . 0 . 0 52 2350994050101 12 4 14204 3 2 . 0 . 0 48 4230794570103 5 4 1901 3 1 . 0 . 0 46 1060593060101 2 4 10117 3 2 . 0 . 0 44 550894030104 23 4 27289 3 2 8.72 0 2.1656191 0 47 870594010101 10 4 13440 3 1 24.71 0 3.207208 0 44 321192030102 7 4 16365 3 2 . 0 . 0 50 7880594010101 4 4 9408 3 1 31.2 0 3.440418 0 44 2990894030101 5 4 7730 3 1 . 0 . 0 47 2381191010101 7 4 11444 3 2 . 0 . 0 50 4230791120101 12 4 1060 3 2 . 0 . 0 46 1690694010101 5 4 3185 3 1 . 0 . 0 45 1170692030102 7 4 12177 3 2 . 0 . 0 45 2591092030101 18 4 15475 3 1 . 0 . 0 49 4231091860101 12 4 2341 3 2 . 0 . 0 49 4230392620101 17 4 2185 3 2 . 0 . 0 42 150294010102 12 4 7364 3 2 8.61 0 2.1529243 0 41 281393030102 5 4 7755 3 2 . 0 . 0 52 2750894040102 14 4 31985 3 1 11 0 2.397895 0 47 350293010101 14 4 8557 3 2 . 0 . 0 41 1610194020102 7 4 7782 3 2 13.47 0 2.600465 0 40 330894030101 12 4 8420 3 2 22.05 0 3.0933125 0 47 1030194010101 20 4 4852 5 2 24.43 0 3.195812 0 40 1361291020102 14 4 40509 3 1 . 0 . 0 51 2360391050101 13 4 25128 3 1 . 0 . 0 42 1090191040101 20 4 17537 3 1 . 0 . 0 40 7580191010101 12 4 20352 3 2 . 0 . 0 40 2600791010102 23 4 13344 3 1 . 0 . 0 46 1490594010102 1 4 8074 3 2 46.78 0 3.845456 0 44 1250493030102 2 4 5960 3 1 . 0 . 0 43 30594010102 15 4 6672 3 1 . 0 . 0 44 3060392010103 19 4 49875 4 1 . 0 . 0 42 870991030101 12 4 19276 3 1 . 0 . 0 48 860792020102 2 4 22660 3 2 . 0 . 0 46 2850593020101 7 4 5833 9 2 . 0 . 0 44 9251093010103 14 4 32341 3 2 . 0 . 0 49 2200992010104 17 4 17868 4 2 . 0 . 0 48 1520993040101 5 4 12415 3 1 . 0 . 0 48 2401192020101 17 4 22110 3 2 . 0 . 0 50 871094010102 17 4 17267 3 2 17.77 0 2.877512 0 49 1610392020101 23 4 13372 3 2 . 0 . 0 42 9100691010101 12 4 10525 3 2 . 0 . 0 45 1990594010102 12 4 34410 3 2 9.61 0 2.2628043 0 44 4230993210102 23 4 2350 3 1 . 0 . 0 48 4230392140103 23 4 1116 3 2 . 0 . 0 42 4230194750101 18 4 7573 3 1 8.46 0 2.1353493 0 40 871391040101 7 4 21563 3 2 . 0 . 0 52 1661394020101 7 4 12820 3 2 9.24 0 2.223542 0 52 4230992950102 23 4 1193 3 2 . 0 . 0 48 110394010102 18 4 20873 3 1 10.13 0 2.3155012 0 42 2390994010102 18 4 14471 3 1 21.22 0 3.054944 0 48 550294010101 7 4 8237 3 1 . 0 . 0 41 4230492870101 12 4 1111 3 2 . 0 . 0 43 550193030101 7 4 14040 3 2 . 0 . 0 40 1550392040101 17 4 6407 6 2 . 0 . 0 42 421394010101 23 4 15955 3 1 6.98 0 1.943049 0 52 2830792010102 10 4 7400 3 2 . 0 . 0 46 1260692010101 18 4 6742 3 2 . 0 . 0 45 4230194030101 19 4 904 3 2 17.94 0 2.887033 0 40 2800294020102 18 4 9639 3 2 18.28 0 2.9058075 0 41 880291010101 10 4 16435 3 1 . 0 . 0 41 510792010102 23 4 10225 3 1 . 0 . 0 46 1040691020101 18 4 20079 3 1 . 0 . 0 45 470691020101 17 4 15353 3 2 . 0 . 0 45 1690193010101 21 4 9184 3 1 . 0 . 0 40 541194010101 12 4 10827 3 1 36.06 0 3.585184 0 50 2360293010102 14 4 5820 3 1 . 0 . 0 41 7820991020101 23 4 9782 3 1 . 0 . 0 48 1581191010101 1 4 13957 3 1 . 0 . 0 50 7910991010102 7 4 17608 3 2 . 0 . 0 48 2950691030102 19 4 11475 3 2 . 0 . 0 45 30291010102 23 4 11180 3 2 . 0 . 0 41 4230594590102 1 4 434 3 2 7.4 0 2.00148 0 44 2161294030101 7 4 14601 3 1 17.21 0 2.845491 0 51 4230394850101 18 4 1100 3 1 . 0 . 0 42 2230394040101 19 4 8736 3 1 13 0 2.564949 0 42 4231092020103 1 4 2996 3 1 . 0 . 0 49 500794020102 19 4 8031 3 2 27.54 0 3.3156395 0 46 1210693020102 4 4 9243 3 2 . 0 . 0 45 91393020101 7 4 7512 3 2 . 0 . 0 52 1880791010101 12 4 8232 3 2 . 0 . 0 46 1780292010104 23 4 55938 3 2 . 0 . 0 41 701094070102 7 4 23625 3 2 . 0 . 0 49 670492050102 10 4 20321 3 2 . 0 . 0 43 1951091020103 20 4 31110 3 2 . 0 . 0 49 621193030101 19 4 21545 3 2 . 0 . 0 50 1210794010101 4 4 11375 3 2 . 0 . 0 46 1680293030101 18 4 5889 3 1 . 0 . 0 41 1070694060102 7 4 6183 3 2 8.88 0 2.1838017 0 45 end label values industry1 industry label def industry 1 "Accommodation And Food Service Activities", modify label def industry 2 "Administrative And Support Service Activities", modify label def industry 4 "Arts, Entertainment And Recreation", modify label def industry 5 "Construction", modify label def industry 7 "Education", modify label def industry 10 "Financial and insurance activities", modify label def industry 12 "Human Health And Social Work Activities", modify label def industry 13 "Information And Communication", modify label def industry 14 "Manufacturing", modify label def industry 15 "Mining and quarrying", modify label def industry 17 "Other service activities", modify label def industry 18 "Professional, Scientific And Technical Activities", modify label def industry 19 "Public admin and defence", modify label def industry 20 "Real estate activit ies", modify label def industry 21 "Transportation And Storage", modify label def industry 23 "Wholesale And Retail Trade; Repair Of Motor Vehicles And Motorcycles", modify label values quarter quarter label def quarter 4 "Oct-Des 2019", modify label values LGWT20 LGWT22 label values FLOW FLOW label def FLOW 3 "In employment at first quarter; in employment at final quarter (EE)", modify label def FLOW 4 "In employment at first quarter; unemployed at final quarter (EU)", modify label def FLOW 5 "In employment at first quarter; inactive at final quarter (EN)", modify label def FLOW 6 "Unemployed at first quarter; in employment at final quarter (UE)", modify label def FLOW 9 "Inactive at first quarter; in employment at final quarter (NE)", modify label values SEX SEX label def SEX 1 "Male", modify label def SEX 2 "Female", modify label values HOURPAY HOURPAY5 label values wdate wdate label def wdate 40 "Oct-Des 2019 1", modify label def wdate 41 "Oct-Des 2019 2", modify label def wdate 42 "Oct-Des 2019 3", modify label def wdate 43 "Oct-Des 2019 4", modify label def wdate 44 "Oct-Des 2019 5", modify label def wdate 45 "Oct-Des 2019 6", modify label def wdate 46 "Oct-Des 2019 7", modify label def wdate 47 "Oct-Des 2019 8", modify label def wdate 48 "Oct-Des 2019 9", modify label def wdate 49 "Oct-Des 2019 10", modify label def wdate 50 "Oct-Des 2019 11", modify label def wdate 51 "Oct-Des 2019 12", modify label def wdate 52 "Oct-Des 2019 13", modify
I tried this command to Collapse at the industry level :
Code:
collapse industry1 Lockdown LGWT20 FLOW SEX HOURPAY ZHC log_HOURPAY wdate , by( quarter PERSID )
Code:
xtreg ZHC Lockdown [fw= LGWT22], fe vce (cluster PERSID )
Could you help with that? Is this the correct way to aggregation at the industry level?
Comment