Tag Archives: Stata output

  • 9

asdoc: Cutomizing the regression output | MS Word from Stata | Confidence Interval, adding stars, etc.

Category:asdoc,Blog,Uncategorized Tags : 

 

Version 2.3 of asdoc adds the following features for reporting detailed regression tables.

1. Reporting confidence interval

2. Suppressing confidence intervals

3. Suppressing the stars which are used to show significance level

4. Customization of significance level for stars

These features are discussed in details below. If you have not already studied the features of asdoc, you can visit this page that lists the table of contents of what asdoc can do. You can also read this one paragraph introduction to asdoc. The following line of code will install this beta version of asdoc from our website

net install asdoc, from(http://fintechprofessor.com) replace
help asdoc

   

Details of the new features

The new features related to creating detailed regression tables with asdoc are discussed below with details. 

 

1. Confidence interval

I received several emails and comments on blog posts suggesting the addition of confidence intervals (CI) to the detailed regression tables created by asdoc. In version 2.3 onwards, confidence intervals are shown by default. This means that we do not have to add an additional option to report CI. See the following example. 

sysuse auto, clear
asdoc reg price mpg rep78 headroom trunk weight length turn , replace

 

 

2. Suppressing the confidence interval

If confidence intervals are not needed, we can use option noci. For example

asdoc reg price mpg rep78 headroom trunk weight length turn , replace noci

 

3. Suppressing stars

Similarly, if we are not interested in reporting significance stars, we can use option nostars. For example, 

 

4. Setting custom significance level

The default significance levels for reporting stars are set at : *** for p-values <=0.01; ** for p-values <=0 .05, and * for p-values <=0.1. However, now we can set our own levels for statistical significance using option setstars. An example of setstars option looks like:

setstars(***@.01, **@.05, *@.1)

As we can see from the above line, setstars separates each argument by a comma. Each argument has three components. The first component is the symbol (in our case it is *) which will be reported for the given significance elve. The second component is the @ sign that connects the significance level with the symbol. And the third component is the value at which the significance level is set. So if we want to report stars such that

* for p-value .001 or less
** for p-value .01 or less
*** for p-value .05 or less

We shall write the option setstars as

setstars(*@.001, **@.01, ***@.05)

Continuing with our example, let us use the above option to report our defined level of stars.

asdoc reg price mpg rep78 headroom trunk weight length turn , replace setstars(*@.001, **@.01, ***@.05)

 

 


  • 42

Publication quality regression tables with asdoc in Stata – video example

Category:asdoc Tags : 

Creating publication-quality tables in Stata with asdoc is as simple as adding asdoc to Stata commands as a prefix. asdoc can create two types of regression tables. The first type (call it detailed) is the detailed table that combines key statistics from the Stata’s regression output with some additional statistics such as mean and standard deviation of the dependent variable etc. This table is the default option in asdoc. The second table is a compact table that nests more than one regressions in one table (call it nested).

In this video post, I show how to use asdoc to produce the following nested table. 

 

 


  • 30

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