Announcement

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

  • #16
    Should be reported as "Number of groups".

    Comment


    • #17
      Jeanne:
      since you have a panel dataset, let's assume that you want to go -xtreg,fe-:
      Code:
      . xtset No Year
      
      Panel variable: No (unbalanced)
       Time variable: Year, 2014 to 2019
               Delta: 1 unit
      
      . xtreg DV IV i.Year, fe
      
      Fixed-effects (within) regression               Number of obs     =         10
      Group variable: No                              Number of groups  =          5
      
      R-squared:                                      Obs per group:
           Within  = 0.9543                                         min =          1
           Between = 0.2618                                         avg =        2.0
           Overall = 0.4181                                         max =          4
      
                                                      F(4,1)            =       5.23
      corr(u_i, Xb) = 0.1948                          Prob > F          =     0.3156
      
      ------------------------------------------------------------------------------
                DV | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
      -------------+----------------------------------------------------------------
                IV |  -84939.43   91782.28    -0.93   0.525     -1251144     1081265
                   |
              Year |
             2016  |  -34471.93   33362.89    -1.03   0.490    -458387.6    389443.7
             2017  |   832.8315      39164     0.02   0.986      -496793    498458.7
             2019  |   58391.72   33705.72     1.73   0.333      -369880    486663.5
                   |
             _cons |     260220   36352.47     7.16   0.088      -201682    722121.9
      -------------+----------------------------------------------------------------
           sigma_u |  97697.769
           sigma_e |  21333.294
               rho |  .95448889   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0: F(4, 1) = 19.92                       Prob > F = 0.1663
      
      .
      The -xtreg,fe- outcome tells that you have 5 panels (firms) that (due to listwise deletion when the observations have at least one missing value in any variables) are measured, on average twice.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #18
        As you did not show the actual regression command you used, it is not possible to give specific advice. Different regression commands report different outputs.

        If you used -regress-, the total number of observations in the estimation sample is the only sample size statistic it gives. If you want to know how many firms there were in the regression, you can get that separately with -distinct firm_id if e(sample)-, where you should replace firm_id by the actual name of the variable that identifies firms. -distinct- is written by Nick Cox and is available from SSC.

        That said, it appears you have panel data. If that is correct, -regress- will only give you pooled estimation. For estimation that accounts for the panel structure, you would first -xtset- your data and then use -xtreg-. -xtreg- does report the number of panels as part of its output. If you are not familiar with -xtset- and -xtreg-, do read -help xtset- and -help xtreg-.

        If the above considerations do not answer your question, please post back showing the exact regression command you used and the output you got from Stata.

        Comment

        Working...
        X