Announcement

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

  • Creating a table using stored values from xtsum

    Dear all,

    I would like to create a table automatically using stored values.

    I run a command
    Code:
    by country: xtsum var1 var2 var2
    xtsum plot general descriptive statistics of longitudinal data var1 var2 var2, by each value of the "country" variable.

    Now, I would like to do a table with the mean - r(mean) - of var1 var2 var2 for every value of country.

    It would be nice to have a similar output:

    Code:
    country1 country2 country3
    var1 6 6 6
    va2 7 7 7
    var3 8 8 8 

    How can I do that?
    Last edited by Martinо Cоmelli; 14 May 2019, 16:15.

  • #2
    I think I found a very simple solution:

    Code:
    estpost tabstat var1 var2 var2, by(country) statistics(mean)
    but i'm not sure it can be used for xtsum data, like within and between estimations. Any ideas?

    Comment


    • #3
      The mean is going to be same regardless, so if the mean is what you want, this is not a problem.

      Comment

      Working...
      X