How to use asdoc : a basic example

  • 16

How to use asdoc : a basic example

Category:asdoc Tags : 

How to use asdoc

Using asdoc is pretty easy. You need to add just asdoc as a prefix to Stata commands. For example, we use sum command to find summary statistics of all numeric variables in the dataset. We shall add just asdoc as a prefix to sum.  Let us load the auto.dta set for practice and find summary stats of all numeric variables and send the output to MS Word with asdoc

sysuse auto
asdoc sum

And voila, a beautiful table of descriptive statistic is ready [click here to see it].

And for correlations, we shall use asdoc cor. If we were to append the results to the same file, we shall just add append after the comma or leave it (append is the default, you can use replace to replace existing file)

asdoc cor
OR 
asdoc cor, append

 

See also the following resources related to asdoc.

YouTube Video: Descriptive / Summary Statistics from Stata in Word with asdoc

YouTube Video: Create publication quality table of correlation in Stata with asdoc

YouTube Video: Writing all statistics to a single Word file from Stata with asdoc

YouTube Video: Create publication quality regression tables in Stata with asdoc

See a Table of Contents that shows what else asdoc can do

 


Leave a Reply

16 Comments

Julia Schmidt

May 22, 2018at 11:20 am

This is such a useful program, it saved a lot of my time. A great breakthrough for all Stata users.

Dr. Yasir Bin Tariq

May 28, 2018at 3:57 pm

Thank you very much. I must tell you this asdoc program has made getting output from STATA very easy. You are a an academic Saint ❤ 😍

Alberto Otete

June 19, 2018at 2:59 pm

I have used asdoc sum, with very good tables in Word. I have thus learnt from this forum.

Myo Win

June 19, 2018at 2:59 pm

Thank you very much Attaullah Shah. asdoc command can create summarize table, corr table and regression tables easily in words doc. This command safe my time a lot.

HCB

August 21, 2018at 4:33 pm

Thank you. This is completely genius and I was able to create descriptive tables in a few clicks. Saved so much time.

Can asdoc be used with imputed logistical regression as well?

    Attaullah Shah

    August 26, 2018at 10:45 am

    Dear HCB, Thanks for your comments. Can you please provide an example data set and the format in which results are required. I will look into the possibility of doing it with the current version of asdoc. If not available in the current version, I will consider it for the next version

Poe Bitra

August 26, 2018at 10:55 am

Firstly, I would like to thank you for the wonderful ASDOC package for Stata! It has been a tremendous help in my studies and it made me think about contributing to the Stata community when I have better understanding of the field.

Recently I have updated the package and the commands “asdoc, cells” no longer work. This is why I wondered if there were any big changes to the code and whether I could retrieve an earlier version of the asdoc.ado file. Thank you in advance!

    Attaullah Shah

    August 26, 2018at 10:58 am

    Dear Poe
    Thanks for the kind words. Version 2 of asdoc is not yet out for public testing. Perhaps you updated it from my website where I upload only trial versions for testing. Recently, I replaced option cell with the option row. Try option row instead of cells and tell me whether it solves the issu. Please do cite asdoc in your research.

Suman Kanougiya

September 14, 2018at 4:23 pm

Dear Attaullah,

The asdoc command is indeed very useful. But, I get two different results with and without asdoc commnad.

e.g

asdoc pwcorr gcl_avg_od sural_latency sural_duration sural_amplitude sural_ncvif group==1, star(0.05) sig

and

 pwcorr gcl_avg_od sural_latency sural_duration sural_amplitude sural_ncvif group==1, star(0.05) sig

Would you please guide me what have I been doing wrong?

Attaullah Shah

September 14, 2018at 5:22 pm

Dear Suman Kanougiya
Thanks for pointing this out. Yes, there was an omission of adding if condition in the asdoc code for pwcor command. I have corrected it and shall send version 2.1 soon to SSC.
In the meanwhile, you can do the following to get correct results

preserve
keep if  group == 1
asdoc pwcorr gcl_avg_od sural_latency sural_duration sural_amplitude sural_ncv, star (0.05) 
restore

Matthew Millard

September 22, 2018at 2:18 am

I have been telling everyone about the asdoc package who uses Stata. Several people told me how much they absolutely love it. One’s exact words were that it is “game changing” for convenience.

Sumeet Malik

October 3, 2018at 1:52 pm

I came across your website through the youtube videos on ASDOC programme, which I think is very helpful and exponentially better than the OUTREG programme. If you could include p-values instead of stars, it would make the program even more useful since some of the top management journals now don’t want the asterisks in the tables.

    Attaullah Shah

    October 10, 2018at 12:03 am

    Dear Sumeet Malik
    That is on my agenda for the next update. Thanks for your suggestion.

Jannik Helweg-Larsen

October 10, 2018at 12:06 am

Such a brilliant and extremely useful and most impressive Stata program!

Terence

October 18, 2018at 10:45 am

This is wonderful. Thank you!

Million Tadesse

October 19, 2018at 4:28 am

Excellent command, asdoc!. Almost ten years ago (approximate) I asked Prof Baum of esttab estout etc author if he can do the same for descriptive stat. results be exported to word. Now time has come! I just started using STATA again (more frequently) with lots of change (in STATA 15).

Leave a Reply

seventeen − 15 =