Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73247

Confusion with a fixed effect regression for panel data with lags/leads

$
0
0
I performed a fixed effects regression but only got around 7'000 observations when I should get more than 100'000.

I am using stata 15.

For extra information, I am using panel data to see the effects that the act of internal migration has on a person's subjective well being.
I think an issue is that I am using the explanatory variable M0 ( shows if the person internally migrated) and its lags and leads ( e.t.c L3.M0, F3.M0). The problem is that as I created this from the original variable (Movest) which includes options such as 'new entrant' and 'moved back to GB', will this affect my results ( because I seem to ignore if they were a new entrant or moved back to UK) and are there recommended solutions I can do for this?

This is what I got from the command:
xtreg lfsato age nkids mastat L5.M0 L4.M0 L3.M0 L2.M0 L1.M0 M0 F1.M0 F2.M0 F3.M0 F4.M0 F5.M0, fe
HTML Code:
Fixed-effects (within) regression               Number of obs     =      7,667
Group variable: pid                             Number of groups  =      4,027

R-sq:                                           Obs per group:
     within  = 0.0083                                         min =          1
     between = 0.0274                                         avg =        1.9
     overall = 0.0238                                         max =          2

                                                F(14,3626)        =       2.17
corr(u_i, Xb)  = -0.4845                        Prob > F          =     0.0068

------------------------------------------------------------------------------
      lfsato |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         age |   .0483116   .0175464     2.75   0.006     .0139098    .0827133
       nkids |  -.1035138   .0644501    -1.61   0.108     -.229876    .0228483
      mastat |  -.0206515   .0396681    -0.52   0.603    -.0984256    .0571225
             |
          M0 |
         L5. |   .1455779   .0881316     1.65   0.099    -.0272146    .3183703
         L4. |   .2665378   .1237939     2.15   0.031     .0238253    .5092504
         L3. |   .2677237   .1488129     1.80   0.072    -.0240415     .559489
         L2. |   .0835615   .1711475     0.49   0.625    -.2519934    .4191163
         L1. |    .145695   .1847631     0.79   0.430    -.2165549     .507945
         --. |   .1794107   .1960381     0.92   0.360    -.2049451    .5637665
         F1. |  -.1019313    .203507    -0.50   0.616    -.5009308    .2970682
         F2. |  -.3197264   .2059309    -1.55   0.121    -.7234784    .0840255
         F3. |  -.2678047   .1987484    -1.35   0.178    -.6574743     .121865
         F4. |  -.1905153   .1841593    -1.03   0.301    -.5515814    .1705508
         F5. |    -.02172   .1577854    -0.14   0.891     -.331077     .287637
             |
       _cons |   2.857905   .9339647     3.06   0.002     1.026757    4.689053
-------------+----------------------------------------------------------------
     sigma_u |   1.224461
     sigma_e |   .7531382
         rho |  .72552085   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(4026, 3626) = 3.70                  Prob > F = 0.0000
and here is a snippet of my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long pid byte lfsato int age byte(nkids mastat movest) float M0
10007857 6 64 0 3 4 0
10007857 5 65 0 3 1 0
10007857 5 66 0 3 1 0
10007857 . 67 0 3 1 0
10014578 5 59 0 1 1 0
10014578 7 61 0 1 1 0
10014578 7 62 0 1 1 0
10014578 6 63 0 1 1 0
10014578 6 65 0 1 1 0
10014578 6 66 0 1 1 0
10014578 5 67 0 1 1 0
10014578 5 68 0 1 1 0
10014578 6 69 0 1 1 0
10014578 7 70 0 1 2 1
10014578 6 71 0 1 1 0
10014608 5 62 0 1 1 0
10014608 6 64 0 1 1 0
10014608 6 65 0 1 1 0
10014608 5 66 0 1 1 0
10014608 6 68 0 1 1 0
10014608 6 69 0 1 1 0
10014608 6 70 0 1 1 0
10014608 5 71 0 1 1 0
10014608 3 72 0 1 1 0
10014608 6 73 0 1 2 1
10014608 3 74 0 1 1 0
10016813 5 41 1 5 1 0
10016813 . 43 0 4 1 0
10016813 6 44 0 4 1 0
10016813 . 45 0 4 1 0
10016813 . 47 0 4 1 0
10016813 . 49 0 3 1 0
10016848 2 37 0 5 2 1
10016848 1 39 0 4 1 0
10016848 4 40 0 2 1 0
10016848 3 41 0 2 1 0
10016848 . 42 0 2 1 0
10016848 6 43 0 2 1 0
10016848 6 44 0 2 1 0
10016848 5 45 0 2 1 0
10016848 5 46 0 1 1 0
10016848 6 47 0 1 1 0
10016848 5 48 0 1 1 0
10016848 4 49 0 1 1 0
10016872 . 17 0 6 1 0
10016872 6 18 0 6 1 0
10016872 . 19 0 6 1 0
10016872 . 19 0 6 1 0
10016872 6 21 0 6 1 0
10016872 6 22 0 2 1 0
10016872 . 23 0 2 1 0
10016872 6 24 0 2 1 0
10016872 6 25 0 2 1 0
10016872 6 26 0 2 1 0
10016872 6 27 1 2 2 1
10017933 6 54 0 5 1 0
10017933 6 55 0 4 1 0
10017933 6 56 0 4 1 0
10017933 3 56 0 4 1 0
10017933 5 58 0 4 1 0
10017933 . 59 0 4 1 0
10017933 5 60 0 4 1 0
10017933 6 60 0 4 1 0
10017933 4 62 0 4 1 0
10017933 6 63 0 4 1 0
10017933 5 64 0 4 1 0
10017933 6 65 0 4 1 0
10017933 6 66 0 4 1 0
10017992 5 17 0 6 1 0
10017992 6 18 0 6 1 0
10017992 5 19 0 6 1 0
10017992 4 19 0 6 1 0
10017992 6 21 0 6 1 0
10017992 . 22 0 6 1 0
10017992 5 23 0 6 1 0
10017992 . 23 0 6 1 0
10017992 5 25 0 6 1 0
10017992 7 26 0 6 1 0
10017992 4 27 0 6 1 0
10017992 5 28 0 6 1 0
10019057 . 64 0 6 2 1
10019057 6 65 0 6 1 0
10019057 6 66 0 6 1 0
10019057 6 67 0 6 1 0
10019057 5 67 0 6 1 0
10019057 . 68 0 6 1 0
10019057 5 69 0 6 1 0
10019057 . 71 0 6 1 0
10019057 6 71 0 6 1 0
10019057 5 73 0 6 1 0
10019057 6 74 0 6 1 0
10019057 6 75 0 6 1 0
10019057 5 76 0 6 1 0
10023526 4 43 0 4 1 0
10023526 5 44 0 4 1 0
10023526 . 48 0 1 1 0
10023526 5 49 0 4 1 0
10023526 5 50 0 4 1 0
10023526 5 51 0 4 1 0
10023526 5 52 0 4 1 0
end
label values lfsato flfsato
label def flfsato 1 "not satisfied at all", modify
label def flfsato 7 "completely satisfied", modify
label values age fage
label values nkids fnkids
label def fnkids 0 "none", modify
label values mastat fmastat
label def fmastat 1 "married", modify
label def fmastat 2 "living as couple", modify
label def fmastat 3 "widowed", modify
label def fmastat 4 "divorced", modify
label def fmastat 5 "separated", modify
label def fmastat 6 "never married", modify
label values movest fmovest
label def fmovest 1 "non-mover", modify
label def fmovest 2 "mover within gb", modify
label def fmovest 4 "mover back to gb", modify
This follows on from where I got rid of individuals that migrated multiple time
https://www.statalist.org/forums/for...multiple-times

Thanks for the help.

Viewing all articles
Browse latest Browse all 73247

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>