Thank you, Clyde, for the reply, I understand your point but how come the following example data allows the estimation without dropping an additional year while it has a similar variable this time lmw which is constant within a year?
-----------------------
------------------
When I run the following code
and stata gives following output
if we take what you said in #15 then should it have not dropped a year here too? due to lmw which is constant within a year.
-----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(logspike lmw median_age median_education share_illeterate share_retired share_students share_unmarried share_women share_agri share_services share_trading share_manufacturing year) -3.4170706 7.824046 35 10 10.90684 2.3139918 2.023752 26.797155 13.73886 4.3713713 44.90681 13.2719 4.224636 2004 -2.841785 8.294049 36 10 10.11645 .5896513 2.232368 23.83671 12.69499 .4683629 52.9002 4.71407 3.142393 2006 -3.8485096 8.433811 35 10 8.807885 1.994 2.0053542 25.155243 12.78523 5.743135 39.88345 11.423695 2.910006 2008 -3.060271 8.987197 35 10 9.257348 1.1297612 3.469716 24.63409 14.048172 2.913295 57.50639 7.941474 5.878557 2010 -3.1668806 9.1049795 37 12 11.313846 1.1189824 3.246734 23.5888 15.25079 2.674123 42.88018 1.3306923 5.635561 2012 -2.626447 9.392662 35.5 10 14.250965 1.44758 5.981085 24.215256 18.896103 5.309056 41.92178 11.290117 4.3161345 2014 -3.035263 7.824046 35 8 24.94258 2.411582 2.0687857 23.043375 5.596759 18.071205 37.827724 16.069403 9.58853 2004 -1.979691 8.294049 33 10 23.63444 1.3409512 1.1733979 29.169844 6.616175 2.940082 39.2728 11.80261 11.010347 2006 -4.603168 8.433811 40 10 29.7847 5.690811 1.241238 20.39517 6.313539 30.08603 18.02271 11.8409 7.477448 2008 -2.4328504 8.987197 36 8 24.49669 2.2567503 2.0568764 25.74037 7.116378 13.233109 29.95527 17.699556 6.658371 2010 -2.5248394 9.1049795 37 9 21.075203 3.399511 2.2731442 22.63762 7.94648 21.418705 21.197315 .4158455 6.402743 2012 -2.2615483 9.392662 40 9 29.85759 4.2597065 3.772423 17.042093 17.281464 35.977978 17.591042 14.6199 7.165493 2014 -2.913256 7.824046 36 10 16.486708 2.691559 1.8031697 26.97494 8.780628 8.136788 38.99605 17.440176 6.688824 2004 -2.641675 8.294049 35 10 14.3521 2.2873812 1.0050443 29.273617 7.893749 .5711666 44.88651 16.005455 6.434148 2006 -4.411202 8.433811 37 10 15.11578 2.526976 .7542983 26.42409 8.041978 11.740806 30.21699 19.36924 6.276433 2008 -2.472361 8.987197 36 10 14.27757 2.270407 2.1635392 25.77645 10.269762 7.460679 41.17196 18.242336 6.679374 2010 -2.9419296 9.1049795 37 10 11.80966 3.051733 3.081607 24.10761 11.634595 8.838715 30.151203 .7680569 11.12961 2012 -2.433613 9.392662 38 10 11.3621 3.106778 2.462341 22.41693 14.661825 11.769317 25.401844 17.888924 12.493567 2014 -2.901879 7.824046 37 10 23.114164 2.536887 1.723712 29.60225 13.199022 28.670237 27.447746 12.94578 6.789503 2004 -2.3008292 8.294049 34 10 16.297745 1.700985 .16370514 36.159004 4.049959 .9187898 38.144917 11.26712 9.229283 2006 -3.7418625 8.433811 37 9 19.25018 3.790027 .3587158 25.588404 13.397354 26.12445 36.957302 11.687654 4.1275344 2008 -2.429707 8.987197 38 9 17.66565 2.946066 1.514906 23.62282 8.056461 20.51382 27.93592 21.62195 6.391588 2010 -2.8944786 9.1049795 40 10 16.300997 4.5193305 .6651658 20.167477 10.316284 22.684656 20.22245 .3725536 7.009204 2012 -2.3074121 9.392662 37 10 20.160286 2.91207 1.628566 20.05286 17.811663 21.99719 18.74904 19.99981 6.625844 2014 -3.0689826 7.824046 40 9 14.696598 8.845533 .6403158 20.53451 6.657221 24.68303 32.90722 13.904582 5.199502 2004 -3.2580965 8.294049 34 10 10.231947 1.4687244 .20539355 31.30534 5.409117 1.3399057 57.55589 11.989794 3.2144725 2006 -4.204693 8.433811 40 10 20.77222 6.464825 .12221632 20.6369 15.578804 35.50686 17.28283 13.592597 4.731545 2008 -2.587422 8.987197 40 10 12.990064 4.909758 1.4079636 20.700485 12.615027 16.141537 29.78276 21.304056 6.897037 2010 -2.659523 9.1049795 40 10 18.40334 7.13759 1.463623 19.88619 15.253842 26.20398 24.162725 .3173602 4.914416 2012 -2.3167696 9.392662 42 9 27.86186 6.7485 1.767647 15.834953 25.91438 48.56338 14.435417 14.183154 4.597822 2014 -2.655118 7.824046 38 8 36.86613 5.415364 .7064816 23.754173 5.475322 27.38824 47.85018 11.228417 4.1117926 2004 -2.642745 8.294049 37 10 27.956715 1.3213423 .09172598 23.07722 6.744209 4.397186 43.11872 22.25546 7.272947 2006 -3.074465 8.433811 38 9 29.515635 4.562873 .4083143 20.508543 6.041085 32.70047 25.94048 17.309027 6.294824 2008 -2.58499 8.987197 38 10 29.097 1.893685 1.0775973 22.90376 6.862245 31.18125 22.865385 13.586557 9.271658 2010 -2.975113 9.1049795 38 9 28.05855 2.3109894 .677605 20.734507 6.676054 29.086473 19.31948 .21634085 7.013789 2012 -2.707024 9.392662 38 8 33.578148 4.3502154 2.0265534 21.05648 10.27356 29.3577 17.129723 19.5642 10.744636 2014 -2.484907 7.824046 37.5 8 35.470394 1.2951858 .52347237 20.66788 2.9510536 25.73541 13.35516 21.43323 3.099942 2004 -2.0949457 8.294049 35 9 24.65865 .6374565 .40857 27.506796 3.5997574 5.693882 38.14806 19.875296 2.655157 2006 -3.6287756 8.433811 38 9 31.44732 1.4250277 0 18.995642 1.8721256 39.28391 22.796656 10.799778 5.287941 2008 -2.5282254 8.987197 40 9 43.43942 3.954788 1.7468052 15.364724 7.088504 52.79863 17.865355 9.960211 7.857956 2010 end
When I run the following code
Code:
xtreg logspike lmw median_age median_education share_illeterate share_retired share_students share_unmarried share_women share_agri share_services share_trading share_manufacturing i.year , fe vce(cluster districtself)
Code:
Fixed-effects (within) regression Number of obs = 588 Group variable: districtself Number of groups = 98 R-sq: Obs per group: within = 0.5873 min = 6 between = 0.0021 avg = 6.0 overall = 0.4835 max = 6 F(17,97) = 39.47 corr(u_i, Xb) = -0.1135 Prob > F = 0.0000 (Std. Err. adjusted for 98 clusters in districtself) ------------------------------------------------------------------------------------- | Robust logspike | Coef. Std. Err. t P>|t| [95% Conf. Interval] --------------------+---------------------------------------------------------------- lmw | -1.210841 .4791554 -2.53 0.013 -2.161832 -.2598498 median_age | -.003657 .0131017 -0.28 0.781 -.0296601 .0223462 median_education | -.0499525 .0266452 -1.87 0.064 -.1028358 .0029308 share_illeterate | .0052515 .0025465 2.06 0.042 .0001974 .0103056 share_retired | .0027109 .018899 0.14 0.886 -.0347984 .0402203 share_students | .0319675 .0146223 2.19 0.031 .0029462 .0609888 share_unmarried | -.0008118 .005405 -0.15 0.881 -.0115391 .0099155 share_women | -.0021351 .0059738 -0.36 0.722 -.0139914 .0097211 share_agri | -.0114931 .0032325 -3.56 0.001 -.0179087 -.0050775 share_services | -.0080453 .0030779 -2.61 0.010 -.014154 -.0019365 share_trading | -.0054309 .0045622 -1.19 0.237 -.0144856 .0036237 share_manufacturing | -.0064336 .0054526 -1.18 0.241 -.0172555 .0043883 | year | 2006 | .9074726 .2433482 3.73 0.000 .4244939 1.390451 2008 | -.0278337 .2958549 -0.09 0.925 -.6150239 .5593565 2010 | 1.295703 .5182802 2.50 0.014 .26706 2.324346 2012 | 1.431845 .5979957 2.39 0.019 .2449892 2.618701 2014 | 2.055355 .7541802 2.73 0.008 .5585157 3.552194 | _cons | 7.737046 3.839832 2.01 0.047 .116042 15.35805 --------------------+---------------------------------------------------------------- sigma_u | .21358472 sigma_e | .36282614 rho | .25735142 (fraction of variance due to u_i) ------------------------------------------------------------------------------------- .
Comment