Hello everyone,
I am working synthetic panel due to which i have collapsed data with respect to cbin (cohort bin for age) and education group (edu_group). I wanted to plot Variance of hour_wage over time which is from 2004 to 2014 with two years gap in every round. Then i would like to plot the variance of hour_wage and ae_consumption over time, by cohort groups. Similarly, the variance of the hour_wage and ae_consumption over time, by edu_group. Here below is the data
Please tell me if there is any efficient way of doing it. The section in bold is the main issue for me.
I am working synthetic panel due to which i have collapsed data with respect to cbin (cohort bin for age) and education group (edu_group). I wanted to plot Variance of hour_wage over time which is from 2004 to 2014 with two years gap in every round. Then i would like to plot the variance of hour_wage and ae_consumption over time, by cohort groups. Similarly, the variance of the hour_wage and ae_consumption over time, by edu_group. Here below is the data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float cbin byte edu_group float(ae_consumption hour_wage c_age year) 3 1 440.6964 20.011213 27 2004 3 2 423.9432 29.47328 27 2004 3 3 428.8206 29.82299 27 2004 4 1 425.2382 24.2419 30 2004 4 2 420.3893 29.41757 30 2004 4 3 493.2135 47.94204 30 2004 5 1 432.2753 25.253265 35 2004 5 2 452.3809 32.823265 35 2004 5 3 465.53345 43.67646 35 2004 6 1 421.073 28.098703 40 2004 6 2 442.3377 37.223385 40 2004 6 3 500.1619 52.70139 40 2004 7 1 397.6652 28.42537 45 2004 7 2 437.4603 39.7994 45 2004 7 3 481.4493 57.02699 45 2004 8 1 408.3766 26.16772 50 2004 8 2 413.7261 39.21839 50 2004 8 3 492.6645 71.293304 50 2004 3 1 393.6165 19.816727 29 2006 3 2 424.2228 25.147636 29 2006 3 3 435.8747 41.67512 29 2006 4 1 399.66 24.987286 34 2006 4 2 422.47015 31.23556 34 2006 4 3 491.8668 48.40184 34 2006 5 1 414.2401 25.99362 39 2006 5 2 430.1524 33.815296 39 2006 5 3 455.8836 55.81765 39 2006 6 1 411.6692 27.97255 44 2006 6 2 426.3551 40.35061 44 2006 6 3 485.83725 66.982 44 2006 7 1 424.8087 28.63389 49 2006 7 2 443.21085 40.12785 49 2006 7 3 508.20355 72.61096 49 2006 2 1 560.89124 22.78973 27 2008 2 2 526.1003 22.583317 27 2008 2 3 525.5 76.65598 27 2008 3 1 542.5067 21.873344 30 2008 3 2 629.8838 33.068836 30 2008 3 3 705.8958 53.8134 30 2008 4 1 637.6502 29.20734 35 2008 4 2 669.334 36.602306 35 2008 4 3 771.1184 49.41074 35 2008 5 1 602.5778 26.90465 40 2008 5 2 658.8535 39.76491 40 2008 5 3 707.9938 55.90078 40 2008 6 1 633.4527 27.88918 45 2008 6 2 661.4158 41.89492 45 2008 6 3 730.1896 72.87195 45 2008 7 1 599.2916 24.39447 50 2008 7 2 659.2191 44.84071 50 2008 7 3 714.4351 40.63889 50 2008 2 1 912.151 35.102135 28 2010 2 2 910.3687 45.17526 28 2010 2 3 1037.072 60.86653 28 2010 3 1 899.1672 36.898376 32 2010 3 2 965.7375 49.24127 32 2010 3 3 1077.8995 90.85306 32 2010 4 1 973.3187 41.19779 36 2010 4 2 1025.908 54.57022 36 2010 4 3 1061.3828 95.40849 36 2010 5 1 952.3712 41.21731 41 2010 5 2 1095.9092 69.342545 41 2010 5 3 1197.1328 111.52193 41 2010 6 1 986.2845 40.08693 46 2010 6 2 1027.2869 69.145584 46 2010 6 3 1223.803 115.39976 46 2010 7 1 911.8214 39.0071 50 2010 7 2 1099.9957 62.53564 50 2010 7 3 1207.9797 126.21684 50 2010 1 1 979.1874 48.36358 26 2012 1 2 1001.3148 43.3796 26 2012 1 3 1118.0404 96.3141 26 2012 2 1 974.6545 42.25338 30 2012 2 2 1019.4177 59.96129 30 2012 2 3 1126.359 94.42162 30 2012 3 1 972.1918 51.99603 35 2012 3 2 1067.8253 66.5342 35 2012 3 3 1211.1705 104.8941 35 2012 4 1 1044.3345 58.05062 40 2012 4 2 1104.1293 73.66813 40 2012 4 3 1227.3896 116.4934 40 2012 5 1 1039.6989 61.18449 45 2012 5 2 1120.9481 87.70039 45 2012 5 3 1243.785 130.04353 45 2012 6 1 1062.4795 63.65802 49 2012 6 2 1123.9371 91.64032 49 2012 6 3 1296.465 154.17195 49 2012 1 1 1050.5168 49.67293 27 2014 1 2 1099.7997 59.52926 27 2014 1 3 1225.2017 99.27192 27 2014 2 1 1086.622 58.78579 31 2014 2 2 1149.1056 71.10374 31 2014 2 3 1268.1682 120.85491 31 2014 3 1 1127.1864 61.70181 36 2014 3 2 1148.7606 82.30375 36 2014 3 3 1325.0287 134.49023 36 2014 4 1 1174.124 69.92044 41 2014 4 2 1222.4196 100.5159 41 2014 4 3 1332.8146 147.88669 41 2014 5 1 1177.6598 74.841034 46 2014 end
Comment