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



Array