Dear Stata users,
I am currently working with Stata 16.1 and encountering an issue while using the outreg and tab commands to generate a two-way table of frequencies.
Below is an example of my dataset:
After running the specified command
The output in Excel appears to be gibberish, similar to the image attached below:

I am seeking assistance in achieving a well-formatted table in Excel or Word, resembling the desired format shown in the second picture below:

If you have any suggestions or insights on how to resolve this issue and obtain a cleaner table output, I would greatly appreciate your guidance.
Thank you in advance for your time and assistance.
Best regards,
Mindy
I am currently working with Stata 16.1 and encountering an issue while using the outreg and tab commands to generate a two-way table of frequencies.
Below is an example of my dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double(wv103 gender) 3 0 3 1 3 1 3 0 3 0 3 1 3 0 2 0 3 0 2 1 2 0 3 1 2 1 3 0 3 0 3 0 . 1 3 0 3 0 2 0 5 0 4 1 3 1 3 1 3 0 3 0 4 1 2 1 2 1 3 1 1 1 4 0 2 0 3 1 3 0 end label values wv103 wv103 label def wv103 1 " Totally disagree", modify label def wv103 2 "Disagree", modify label def wv103 3 "Agree", modify label def wv103 4 "Totally agree", modify label def wv103 5 "Neither agree nor disagree", modify label values gender gender label def gender 0 "Female", modify label def gender 1 "Male", modify
Code:
logout, save(Table1) excel replace:tab wv103 gender, ce
I am seeking assistance in achieving a well-formatted table in Excel or Word, resembling the desired format shown in the second picture below:
If you have any suggestions or insights on how to resolve this issue and obtain a cleaner table output, I would greatly appreciate your guidance.
Thank you in advance for your time and assistance.
Best regards,
Mindy
Comment