Hi all,
I am trying to format my data (dta file) to wide format.
I did try with collapse but lamentably gave me a long format, example

My desired data format looks like:

Please any advice could help me.
Thanks in advance.
Rodrigo.
I am trying to format my data (dta file) to wide format.
I did try with collapse but lamentably gave me a long format, example
Code:
clear all webuse auto collapse (sum) mpg, by(foreign rep78)
My desired data format looks like:
Code:
table foreign rep78, c(sum mpg)
Please any advice could help me.
Thanks in advance.
Rodrigo.
Comment