This is my first post, therefore I hope it will be comprehensible and compliant to the rules.
I would like to use the command tabout in Stata16 on Windows10 to generate a table containing the mean of 5 variables.
In order to be more clear, I'd like to make an example with a common dataset.
> sysuse auto
> tabulate foreign rep78, summarize (price) means
> tabout foreign rep78 using giorgio.txt, replace c(mean price) sum format (2 2) clab(_ _) layout(rb) h3(nil) style(tex) bt font(bold) topstr(11cm)
What I have here is quite clear and simple for me, I cross-tabulated foreign and rep78 with the table containing values of the mean of price.
What if I would be interested in tabulating and then exporting a table which contains not only the mean of price but, for example, also the mean of the weight of the cars?
As I understand I am not good with words, I am gonna show below a short example of what I would need.
repair record 1978 | 1 | 2 | 3 | 4 | 5 | total | ||
car type | ||||||||
mean of price | domestic | |||||||
foreign | ||||||||
mean of weight | domestic | |||||||
foreign |
Thank you in advance for all your answers and I hope I was clear enough
Giorgio
0 Response to Tabout: produce a table of means with multiple variables
Post a Comment