Announcement

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

  • Report Obs. by Country Names

    Hello,

    I'm trying to report how many countries are used in the regression. Overall, I have 210 countries but when I use xtreg with cluster (countryid) I get 19 cluster with 245 obs. Does that mean stata only uses 19 countries out of the 210? If so how do I know exactly which countries were used to report them?

    Code:
    . xtreg RND_L1 PT LVG EDU RER GI EX i.year, fe vce (cluster countryid)
    
    Fixed-effects (within) regression               Number of obs     =        245
    Group variable: countryid                       Number of groups  =         19
    
    R-squared:                                      Obs per group:
         Within  = 0.8208                                         min =          1
         Between = 0.8691                                         avg =       12.9
         Overall = 0.8531                                         max =         22
    
                                                    F(17, 18)         =          .
    corr(u_i, Xb) = -0.1732                         Prob > F          =          .
    
                                 (Std. err. adjusted for 19 clusters in countryid)
    ------------------------------------------------------------------------------
                 |               Robust
          RND_L1 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
              PT |   .0000107   4.80e-06     2.24   0.038     6.52e-07    .0000208
             LVG |   .0010705   .0046121     0.23   0.819    -.0086193    .0107602
             EDU |  -.0007879    .000812    -0.97   0.345    -.0024938    .0009181
             RER |   .1875298   .0261458     7.17   0.000     .1325996      .24246
              GI |   .1811364   .1003071     1.81   0.088     -.029601    .3918738
              EX |   1.38e-13   4.78e-14     2.89   0.010     3.79e-14    2.39e-13
                 |
            year |
           1998  |  -.1235447   .0490124    -2.52   0.021     -.226516   -.0205734
           2000  |  -.1809205   .0561841    -3.22   0.005    -.2989589   -.0628821
           2002  |  -.1630455   .0647517    -2.52   0.021    -.2990839   -.0270071
           2003  |   -.211208   .0807408    -2.62   0.018    -.3808382   -.0415779
           2004  |  -.2558977   .0846964    -3.02   0.007    -.4338382   -.0779572
           2005  |   -.375531   .0847287    -4.43   0.000    -.5535394   -.1975226
           2006  |  -.4018351   .0963889    -4.17   0.001    -.6043408   -.1993295
           2007  |  -.3308158   .1063462    -3.11   0.006    -.5542408   -.1073908
           2008  |  -.3494172   .0976471    -3.58   0.002    -.5545661   -.1442682
           2009  |  -.3675588   .1091574    -3.37   0.003      -.59689   -.1382276
           2010  |  -.3349151    .110104    -3.04   0.007     -.566235   -.1035951
           2011  |  -.4053691   .1132132    -3.58   0.002    -.6432211   -.1675171
           2012  |  -.3816739   .1179611    -3.24   0.005    -.6295009   -.1338469
           2013  |  -.3914677   .1106028    -3.54   0.002    -.6238355   -.1590998
           2014  |  -.3465078   .1171806    -2.96   0.008    -.5926951   -.1003206
           2015  |  -.3408115   .1167894    -2.92   0.009     -.586177    -.095446
           2016  |  -.3211964   .1259811    -2.55   0.020    -.5858728     -.05652
           2017  |  -.4002083   .1189205    -3.37   0.003    -.6500509   -.1503657
           2018  |  -.4021009   .1276099    -3.15   0.006    -.6701993   -.1340024
           2019  |  -.3948782   .1365883    -2.89   0.010    -.6818395   -.1079169
           2020  |  -.3981084   .1501188    -2.65   0.016    -.7134963   -.0827204
                 |
           _cons |    .305317   .1684274     1.81   0.087    -.0485358    .6591699
    -------------+----------------------------------------------------------------
         sigma_u |  .37211548
         sigma_e |  .13867569
             rho |  .87805428   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------

  • #2
    Code:
    levelsof countryid if e(sample)
    See e.g. https://www.stata-journal.com/articl...article=dm0030 for more on the main ideas.

    Comment


    • #3
      Nick Cox Thank you for the prompt response. It's working.

      Comment

      Working...
      X