Dear Statalist,
I need to plot a table with the means of a variable, for all the possible intersection of the year and region (to be plotted on the vertical and on the horizontal axis). To be clear, I just need a simple double entry table, with the years on the vertical axis, the regions on the horizontal one, and the mean values of the x variable inside the table. I tried a couple of option with table tabstat, like
but I haven't found a satisfying one. The first one returns me an error (too many variables after by) while the second one gives me as many output as the number of years. Table returns me frequencies, and not means. I want a single table, with years and regions on the axis, and mean value of x in the middle. Is possible to obtain it with Stata? Any suggestion about the syntax to adopt? If possible, I'd like to have also the median value. I look at the guide before bothering you, but unfortunately I wasn't able to find what I need. May someone help me?
Thank to all of you in advance for the patience, and to anyone that will help!
I need to plot a table with the means of a variable, for all the possible intersection of the year and region (to be plotted on the vertical and on the horizontal axis). To be clear, I just need a simple double entry table, with the years on the vertical axis, the regions on the horizontal one, and the mean values of the x variable inside the table. I tried a couple of option with table tabstat, like
Code:
tabstat x, by (year region) by year: tabstat x, by (regione) table x year region by region: table year x
Thank to all of you in advance for the patience, and to anyone that will help!
Comment