Announcement

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

  • One table of means sorted by groups of countries

    Hi,

    I am working with panel data of over 3500 observations.

    I want to create a table that shows the mean values of the explanatory variables for all countries grouped according to their income group (I already have created a variable called "income_group" and sorted the countries to their income groups accordingly). I tried to do this by typing the following:

    by income_group, sort : table cname if inrange(year, 1996, 2007), contents(mean vdem_libdem mean mad_gdppc mean gini mean wdi_gert mean wdi_unempilo )

    This gives me four tables, each one for the respective income groups (which are three) and one for countries that lack values on income group. Now what I want to get instead, is something that looks like the picture below. Is there a way to do this in Stata?

    Many thanks,

    Uendi



    Click image for larger version

Name:	Screenshot 2020-03-04 at 14.30.01.png
Views:	1
Size:	329.9 KB
ID:	1539648

  • #2
    if you have no more than 5 columns of statistics you can use -table- with a super-row-variable; see
    Code:
    help table

    Comment


    • #3
      I found the way how to do this, namely by typing:

      table cname if inrange(year, 1996, 2007), contents(mean vdem_libdem mean mad_gdppc mean gini mean wdi_gert mean wdi_unempilo ) by(income_group) concise

      My question would now is there a way to export the data to word for instance?

      Comment

      Working...
      X