1 / 12

Panel Data

Panel Data. Assembling the Data. insheet using marriage-data.csv, c d u "background-data", clear d u "experience-data", clear u "wage-data", clear d reshape long lwage , i (nr) j(year) sort nr year merge 1:1 nr year using "marriage-data" drop _merge

milek
Download Presentation

Panel Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Panel Data

  2. Assembling the Data insheet using marriage-data.csv, c d u "background-data", clear d u "experience-data", clear u "wage-data", clear d reshape long lwage, i(nr) j(year) sort nr year merge 1:1 nr year using "marriage-data" drop _merge merge 1:1 nr year using "experience-data" drop _merge merge n:1 nr using "background-data" drop _merge d sum save "data-exercise-11-nls", replace

  3. (2) Is the data balanced? xtset nr year panel variable: nr (strongly balanced) time variable: year, 1980 to 1987 delta: 1 unit What does being balanced mean?

  4. (3) First Step . reglwage married Source | SS df MS Number of obs = 4360 -------------+------------------------------ F( 1, 4358) = 191.75 Model | 52.1141809 1 52.1141809 Prob > F = 0.0000 Residual | 1184.41546 4358 .271779592 R-squared = 0.0421 -------------+------------------------------ Adj R-squared = 0.0419 Total | 1236.52964 4359 .283672779 Root MSE = .52132 ------------------------------------------------------------------------------ lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .2203038 .0159094 13.85 0.000 .1891134 .2514942 _cons | 1.552436 .010541 147.28 0.000 1.53177 1.573101 ------------------------------------------------------------------------------

  5. (4) Controls . reglwage married exper union educ black hisp Source | SS df MS Number of obs = 4360 -------------+------------------------------ F( 6, 4353) = 163.11 Model | 226.971557 6 37.8285928 Prob > F = 0.0000 Residual | 1009.55809 4353 .231922372 R-squared = 0.1836 -------------+------------------------------ Adj R-squared = 0.1824 Total | 1236.52964 4359 .283672779 Root MSE = .48158 ------------------------------------------------------------------------------ lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .1127231 .0156735 7.19 0.000 .0819951 .1434511 exper | .0501619 .0028974 17.31 0.000 .0444815 .0558423 union | .1836459 .0171274 10.72 0.000 .1500675 .2172243 educ | .1036792 .0045625 22.72 0.000 .0947343 .1126242 black | -.1424234 .023598 -6.04 0.000 -.1886875 -.0961593 hisp | .0127569 .0208347 0.61 0.540 -.0280897 .0536036 _cons | .0225412 .0630948 0.36 0.721 -.1011567 .1462391 ------------------------------------------------------------------------------

  6. (5) Panel Data . xtreglwage married exper union educ black hisp, fe note: educ omitted because of collinearity note: black omitted because of collinearity note: hisp omitted because of collinearity Fixed-effects (within) regression Number of obs = 4360 Group variable: nr Number of groups = 545 R-sq: within = 0.1672 Obs per group: min = 8 between = 0.0001 avg = 8.0 overall = 0.0513 max = 8 F(3,3812) = 255.03 corr(u_i, Xb) = -0.1575 Prob > F = 0.0000 ------------------------------------------------------------------------------ lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .0610384 .0182929 3.34 0.001 .0251736 .0969032 exper | .0598672 .0025835 23.17 0.000 .054802 .0649325 union | .083791 .019414 4.32 0.000 .045728 .1218539 educ | 0 (omitted) black | 0 (omitted) hisp | 0 (omitted) _cons | 1.211888 .0169244 71.61 0.000 1.178706 1.24507 -------------+---------------------------------------------------------------- sigma_u | .40514496 sigma_e | .35352815 rho | .56772216 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(544, 3812) = 10.08 Prob > F = 0.0000 Why have ‘black’, ‘educ’ and ‘hisp’ been dropped from the regression? What variation are we working off when we include fixed effects?

  7. Collinearity

  8. (6) Clustering xtreglwage married exper union, fe cluster(nr) Fixed-effects (within) regression Number of obs = 4360 Group variable: nr Number of groups = 545 R-sq: within = 0.1672 Obs per group: min = 8 between = 0.0001 avg = 8.0 overall = 0.0513 max = 8 F(3,544) = 136.41 corr(u_i, Xb) = -0.1575 Prob > F = 0.0000 (Std. Err. adjusted for 545 clusters in nr) ------------------------------------------------------------------------------ | Robust lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .0610384 .0212076 2.88 0.004 .0193796 .1026972 exper | .0598672 .0033717 17.76 0.000 .0532441 .0664904 union | .083791 .0231101 3.63 0.000 .0383951 .1291868 _cons | 1.211888 .0216293 56.03 0.000 1.169401 1.254375 -------------+---------------------------------------------------------------- sigma_u | .40514496 sigma_e | .35352815 rho | .56772216 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  9. (7) Are dummies equivalent to FE? . reglwage married exper union i.nr, cluster(nr) Linear regression Number of obs = 4360 F( 2, 544) = . Prob > F = . R-squared = 0.6147 Root MSE = .35353 (Std. Err. adjusted for 545 clusters in nr) ------------------------------------------------------------------------------ | Robust lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .0610384 .0226704 2.69 0.007 .0165062 .1055706 exper | .0598672 .0036043 16.61 0.000 .0527872 .0669472 union | .083791 .0247041 3.39 0.001 .0352639 .132318

  10. (7) Time FE? Why not include Experience? . xtreglwage married union i.year, fe cluster(nr) Fixed-effects (within) regression Number of obs = 4360 Group variable: nr Number of groups = 545 R-sq: within = 0.1689 Obs per group: min = 8 between = 0.0789 avg = 8.0 overall = 0.1026 max = 8 F(9,544) = 42.75 corr(u_i, Xb) = 0.0455 Prob > F = 0.0000 (Std. Err. adjusted for 545 clusters in nr) ------------------------------------------------------------------------------ | Robust lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .0583372 .0228114 2.56 0.011 .013528 .1031464 union | .0833697 .0246533 3.38 0.001 .0349423 .1317971 | year | 1981 | .1135489 .0263198 4.31 0.000 .061848 .1652498 1982 | .1676693 .0259521 6.46 0.000 .1166907 .218648 1983 | .2109386 .0266852 7.90 0.000 .1585199 .2633572 1984 | .2784071 .0295839 9.41 0.000 .2202945 .3365197 1985 | .327462 .0289156 11.32 0.000 .270662 .384262 1986 | .3868075 .0302537 12.79 0.000 .327379 .4462359 1987 | .447037 .0292727 15.27 0.000 .3895357 .5045382 | _cons | 1.361709 .0217851 62.51 0.000 1.318915 1.404502 -------------+---------------------------------------------------------------- sigma_u | .38216008 sigma_e | .35343397 rho | .53899212 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  11. (8) Driven By Divorce? . xtreglwage married union i.year if everdivorce == 0, fe cluster(nr) Fixed-effects (within) regression Number of obs = 3792 Group variable: nr Number of groups = 474 R-sq: within = 0.1708 Obs per group: min = 8 between = 0.0834 avg = 8.0 overall = 0.1039 max = 8 F(9,473) = 44.98 corr(u_i, Xb) = 0.0456 Prob > F = 0.0000 (Std. Err. adjusted for 474 clusters in nr) ------------------------------------------------------------------------------ | Robust lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- married | .0631041 .0273805 2.30 0.022 .0093017 .1169066 union | .07263 .0250568 2.90 0.004 .0233935 .1218665 | year | 1981 | .1211224 .0271089 4.47 0.000 .0678536 .1743912 1982 | .1672227 .0269524 6.20 0.000 .1142615 .2201839 1983 | .219521 .0275964 7.95 0.000 .1652942 .2737478 1984 | .2828337 .0312869 9.04 0.000 .2213551 .3443122 1985 | .3269934 .0306809 10.66 0.000 .2667057 .3872812 1986 | .3897902 .0324352 12.02 0.000 .3260552 .4535251 1987 | .4581408 .0317265 14.44 0.000 .3957985 .5204831 | _cons | 1.359177 .0218908 62.09 0.000 1.316162 1.402192 -------------+---------------------------------------------------------------- sigma_u | .38405618 sigma_e | .35830293 rho | .5346494 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  12. (8) Driven by Divorce 2? • . xtreglwage married union i.year if everdivorce == 1, fe cluster(nr) • Fixed-effects (within) regression Number of obs = 568 • Group variable: nr Number of groups = 71 • R-sq: within = 0.1663 Obs per group: min = 8 • between = 0.1058 avg = 8.0 • overall = 0.1110 max = 8 • F(9,70) = 6.21 • corr(u_i, Xb) = 0.0697 Prob > F = 0.0000 • (Std. Err. adjusted for 71 clusters in nr) • ------------------------------------------------------------------------------ • | Robust • lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] • -------------+---------------------------------------------------------------- • married | .0305923 .0349467 0.88 0.384 -.0391067 .1002913 • union | .1277057 .0596013 2.14 0.036 .0088347 .2465766 • | • year | • 1981 | .064469 .0568619 1.13 0.261 -.0489385 .1778764 • 1982 | .16627 .0565055 2.94 0.004 .0535734 .2789667 • 1983 | .1538386 .0637881 2.41 0.019 .0266171 .28106 • 1984 | .2469232 .0565838 4.36 0.000 .1340703 .3597761 • 1985 | .3212491 .0619483 5.19 0.000 .197697 .4448011 • 1986 | .3546588 .0628833 5.64 0.000 .2292421 .4800755 • 1987 | .3573659 .0668428 5.35 0.000 .2240521 .4906797 • | • _cons | 1.38598 .0568407 24.38 0.000 1.272615 1.499346 • -------------+---------------------------------------------------------------- • sigma_u | .36780709 • sigma_e | .31952552 • rho | .56989994 (fraction of variance due to u_i) • ------------------------------------------------------------------------------ • .

More Related