Announcement

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

  • Panel data: the share of inter and intra variabilities in total variabilities for each variable

    Hello. I have panel data. How could we calculate the share of inter and intra variabilities in total variabilities? A reviewer of an econometrics journal recommends reporting such share. Stata’s “xtsum” reports the standard deviations for overall, between, and within. However, the sum of the between (inter) and within (intra) variances is not equal to the overall variance, and the standard deviation for between can be larger than the standard deviation for overall, as follows.

    https://www.stata.com/manuals13/xtxtsum.pdf

    . use http://www.stata-press.com/data/r13/nlswork
    (National Longitudinal Survey. Young Women 14-26 years of age in 1968)

    . xtsum hours

    Variable | Mean Std. Dev. Min Max | Observations
    -----------------+--------------------------------------------+----------------
    hours overall | 36.55956 9.869623 1 168 | N = 28467
    between | 7.846585 1 83.5 | n = 4710
    within | 7.520712 -2.154726 130.0596 | T-bar = 6.04395

    . xtsum birth_yr

    Variable | Mean Std. Dev. Min Max | Observations
    -----------------+--------------------------------------------+----------------
    birth_yr overall | 48.08509 3.012837 41 54 | N = 28534
    between | 3.051795 41 54 | n = 4711
    within | 0 48.08509 48.08509 | T-bar = 6.05689

    Then, we cannot calculate a meaningful share of the between or within variabilities in overall variabilities using the xtsum statistics? Is there any way to obtain such share? I am using Stata/SE 16.1. I would appreciate your help.
    Last edited by Mizuki Kawabata; 22 Apr 2020, 06:16.

  • #2
    Mizuki:
    no, you can't, as the overall standard deviation calulated via -xtsum- equals the one you can get from -summarize-, but, in turn, it is not the sum of within and between standard deviation (see the -xtsum- entry in Stata .pdf manual for further details):
    Code:
    use "https://www.stata-press.com/data/r16/nlswork.dta"
    . xtsum age
    
    Variable         |      Mean   Std. Dev.       Min        Max |    Observations
    -----------------+--------------------------------------------+----------------
    age      overall |  29.04511   6.700584         14         46 |     N =   28510
             between |             5.485756         14         45 |     n =    4710
             within  |              5.16945   14.79511   43.79511 | T-bar = 6.05308
    
    . sum age
    
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
             age |     28,510    29.04511    6.700584         14         46
    
    .
    :
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      Thank you very much for your information! Then, the sum of the between and within standard deviations from xtsum could be considered as the total variability?

      Comment


      • #4
        Muzuki:
        not quite.
        They have two different flavours: the first one is the within panel standard deviation, whereas the second is the between panels standard deviation.
        The main issue here is demeaning, as you can find out in -xtsum- entry in Stata .pdf manual, that, on the contrary, does not affest overall standard deviation.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Dear Carlo,

          Thank you for your prompt reply. I appreciate your information.

          Comment

          Working...
          X