Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Number of observations

    So I have a panel of 26 countries for the period of 1996-2015. When I summarise my variables, it shows that I have 520 variables but upon using -reg, fe-, it shows a different observation (see below). Please can you help me identify what is going on?

    Code:
     summarize PATR1 PATR2 PATR3 PATR4 PATR5 PATR6 PATR7 PATR8 PATR9 PATR10 PATR11 PATR12 PATR13 pr
    > eelection left right coalition plurality pit corporate inflation gdp unemployment govtexp wage
    >  waged urbanisation dependency dependencyold dependencyyoung popbelow14 pop1564 pop65andabove 
    > eurozone eu  
    
        Variable |       Obs        Mean    Std. Dev.       Min        Max
    -------------+--------------------------------------------------------
           PATR1 |       520    .2004171    .0724325      .0015      .3926
           PATR2 |       520      .23602    .0711008      .0352      .4139
           PATR3 |       520    .2548158    .0714432       .048      .4317
           PATR4 |       520    .2774563    .0719972      .0883      .4495
           PATR5 |       520    .3016338     .075231      .1137      .4837
    -------------+--------------------------------------------------------
           PATR6 |       520    .3298183    .0802829      .1436      .5258
           PATR7 |       520    .0453554    .1107577     -.3949      .2469
           PATR8 |       520    .1509763    .0834991      -.086      .3111
           PATR9 |       520     .243129     .069407       .093      .4139
          PATR10 |       520    .2775042    .0711219      .1293      .4495
    -------------+--------------------------------------------------------
          PATR11 |       520    .1763331    .0710735       .006      .3648
          PATR12 |       520    .2089246    .0701328      .0562       .396
          PATR13 |       520    .2364313    .0682894      .0046      .4168
     preelection |       520    .2586538    .3149727          0   1.416667
            left |       520    .3557692    .4792067          0          1
    -------------+--------------------------------------------------------
           right |       520    .3653846    .4820015          0          1
       coalition |       520          .4    .4903697          0          1
       plurality |       520    .3980769    .4899728          0          1
             pit |       520    .0803942    .0475271       .023        .29
       corporate |       520    .2778769    .0834233         .1       .567
    -------------+--------------------------------------------------------
       inflation |       520    .0606099    .4730403  -.0447994   10.58374
             gdp |       520    23232.84    15591.86       2800      84400
    unemployment |       520    .0899811    .0429745     .01805     .27466
         govtexp |       520    .4501577    .0654784       .295   .6530001
            wage |       520    13.94046     12.7818          0       45.8
    -------------+--------------------------------------------------------
           waged |       520    .2826923    .4507417          0          1
    urbanisation |       520    .7248561    .1208176      .4965     .97858
      dependency |       520    .4864921    .0387516   .3809865    .602668
    dependency~d |       520     .238424    .0390123   .1524914   .3508135
    dependency~g |       520     .248068    .0334883   .1939181   .3588168
    -------------+--------------------------------------------------------
      popbelow14 |       520    .1667445    .0210102   .1288582   .2356849
         pop1564 |       520    .6731836    .0176502   .6239595   .7241201
    pop65andab~5 |       520    .1600718    .0237915   .1051932   .2240988
        eurozone |       520         .45    .4979728          0          1
              eu |       520    .8192308    .3851974          0          1
    
    .

    Code:
     xtreg PATR1 l.PATR1 preelection right left plurality coalition pit corporate inflation gdp gdp
    > growth unemployment govtexp wage waged urbanisation dependencyold dependencyyoung popbelow14 p
    > op65andabove i.year, fe robust cluster (country)
    
    Fixed-effects (within) regression               Number of obs      =       492
    Group variable: country                         Number of groups   =        26
    
    R-sq:  within  = 0.6603                         Obs per group: min =        17
           between = 0.6627                                        avg =      18.9
           overall = 0.6658                                        max =        19
    
                                                    F(25,25)           =         .
    corr(u_i, Xb)  = 0.1932                         Prob > F           =         .
    
                                      (Std. Err. adjusted for 26 clusters in country)
    ---------------------------------------------------------------------------------
                    |               Robust
              PATR1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ----------------+----------------------------------------------------------------
              PATR1 |
                L1. |   .7169789   .0513952    13.95   0.000     .6111285    .8228292
                    |
        preelection |  -.0026612   .0028907    -0.92   0.366    -.0086148    .0032924
              right |   .0008262   .0020113     0.41   0.685    -.0033161    .0049685
               left |   .0051857   .0022808     2.27   0.032     .0004882    .0098831
          plurality |   .0016927   .0056537     0.30   0.767    -.0099513    .0133367
          coalition |   -.005012   .0025073    -2.00   0.057     -.010176    .0001519
                pit |  -.1750936   .2201716    -0.80   0.434    -.6285456    .2783584
          corporate |   .0079438    .038946     0.20   0.840     -.072267    .0881547
          inflation |  -.0037523   .0014018    -2.68   0.013    -.0066394   -.0008653
                gdp |  -1.33e-06   7.62e-07    -1.75   0.093    -2.90e-06    2.38e-07
          gdpgrowth |  -.0044768   .0253438    -0.18   0.861    -.0566734    .0477197
       unemployment |   -.060075    .053301    -1.13   0.270    -.1698505    .0497004
            govtexp |  -.0295074   .0345071    -0.86   0.401    -.1005761    .0415613
               wage |    -.00113   .0006744    -1.68   0.106     -.002519     .000259
              waged |   .0000877   .0061243     0.01   0.989    -.0125254    .0127009
       urbanisation |    .201197   .1432205     1.40   0.172    -.0937711    .4961652
      dependencyold |    .356433   1.061667     0.34   0.740     -1.83011    2.542976
    dependencyyoung |   .2435351   1.647566     0.15   0.884     -3.14969     3.63676
         popbelow14 |  -.4625138   2.995048    -0.15   0.879    -6.630931    5.705903
     pop65andabove5 |  -.8879482   1.977065    -0.45   0.657    -4.959789    3.183893
                    |
               year |
              1998  |  -.0084283   .0055896    -1.51   0.144    -.0199403    .0030837
              1999  |   .0033711   .0091126     0.37   0.715    -.0153966    .0221388
              2000  |   .0088325   .0074146     1.19   0.245     -.006438    .0241031
              2001  |  -.0014606   .0062724    -0.23   0.818    -.0143789    .0114576
              2002  |   .0019292   .0061166     0.32   0.755    -.0106683    .0145267
              2003  |  -.0035718    .006679    -0.53   0.598    -.0173274    .0101838
              2004  |   .0057334   .0087875     0.65   0.520    -.0123649    .0238316
              2005  |   .0089908   .0089235     1.01   0.323    -.0093876    .0273691
              2006  |   .0053108   .0082619     0.64   0.526     -.011705    .0223265
              2007  |    .007774   .0104554     0.74   0.464    -.0137593    .0293074
              2008  |    .009347   .0131892     0.71   0.485    -.0178166    .0365106
              2009  |   .0066291   .0116686     0.57   0.575    -.0174028    .0306611
              2010  |   .0114686   .0117866     0.97   0.340    -.0128063    .0357435
              2011  |   .0186259   .0134997     1.38   0.180    -.0091772     .046429
              2012  |   .0188597   .0146829     1.28   0.211    -.0113803    .0490997
              2013  |    .011197   .0140363     0.80   0.433    -.0177113    .0401053
              2014  |   .0154566   .0155283     1.00   0.329    -.0165245    .0474377
              2015  |   .0144624   .0153558     0.94   0.355    -.0171635    .0460882
                    |
              _cons |   .0560641   .2149028     0.26   0.796    -.3865366    .4986647
    ----------------+----------------------------------------------------------------
            sigma_u |  .04041721
            sigma_e |  .01748839
                rho |  .84229938   (fraction of variance due to u_i)
    ---------------------------------------------------------------------------------

  • #2
    Hi Drishta,

    Is "year" fully populated?

    Alex

    Comment


    • #3
      For any observation for which one or more of the variables in the model has a missing value, Stata omits that observation from them estimation.

      It appears you are using a lagged variable. So in your first year, 1996, the value for 1995 will be missing. Thus, you lose 26 observations from 1996, which reduces the number of observations from 520 to 494. There seem to be two other missing values among your variables. The following might help you identify those variables.
      Code:
      misstable summarize PATR1 preelection right left plurality coalition pit corporate inflation gdp gdpgrowth unemployment govtexp wage waged urbanisation dependencyold dependencyyoung popbelow14 pop65andabove year

      Comment


      • #4
        Also, immediately after the model fit command

        Code:
        edit if !e(sample)
        shows what was not included in estimation.

        Comment

        Working...
        X