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.
apologies for bothering you, I found the correct command online it was helpful and issued resolved.
Thank you for your response.
Hi,
Thanks for replying.
When you use the nested function, you get SD values in parentheses under the coefficients. You also get *** for p values. And you have the dependent variable in the columns.
With the wide function, where you have the dependent variables in the rows, you do not get the SD in parentheses under the coefficients. So, i would like in the wide option to have the same model output as with the nested function, only with the dependent variables in the rows, such as with the wide option. I would like the t values to be switched out with SD in the wide option also.
Hope this is a little more clear.
Theo
Seem you might benefit from reading the help file of asdoc. It has dozens of example on how to use the different options with the wide regression tables. What you are asking is already there. See the following example where I am reporting the SE under the regression coefficients and stars with coefficients for statistical significance.
You can read asdoc help file by
. Specifically, read Section 4.3 of the help file and examples 26 to 35.
Following are the examples of wide regressions with the mentioned options
Dear Professor Shah,
I am very thankful for your asdoc – breakthrough – program.
My name is Jana Tillmann and I currently write my Thesis. Hopefully, you can help me with this issue, it is very urgent as I have to hand in the thesis on Thursday.
What can I do to create a nested table with multiple additional regression statistics?
When I try to create nested regression tables, I can not find a solution to extend the tables with multiple additional regression statistics.
Here is the command I use:
If I use only one additional statistic:
–
RMSE
:If I use stats() instead of stat(), I don’t get any additional statistics:
If I list them separately, it only gives me the latter one:
With a wide format, it does work:
What can I do to create a nested table with a few extra regression statistics?
Jana
The error you are getting is due to incorrect use of the stat() option.
Since asdoc report observations by default, there is no need to write N in the stat option.
The stat() option needs that you type comma between different statistics.
So the correct syntax would be
Please cite asdoc in your research.
In-text citation
Tables were created using asdoc, a Stata program written by Shah (2018).
Bibliography
Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.
Dear Professor Shah,
I am very thankful for your asdoc – breakthrough – program.
My name is Jana Tillmann and I currently write my Thesis.
Hopefully you can help me with this issue, it is very urgent as I have to hand in the thesis on Thursday.
What can I do to create a nested table with multiple additional regression statistics?
When I try to create nested regression tables, I can not find a solution to extend the tables with multiple additional regression statistics.
Here is the command I use:
If I use only one additional statistic:
– RMSE:
If I use
stats()
instead ofstat()
, I don’t get any additional statistics:If I list them separately, it only gives me the latter one:
With a wide format, it does work:
What can I do to create a nested table with a few extra regression statistics?
I have fixed the issue.
The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.
Please do remember to cite asdoc. To cite:
In-text citation
Tables were created using asdoc, a Stata program written by Shah (2018).
Bibliography
Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.
Dear Dr. Shah,
Thank you for this wonderful program!
I’m attempting to create a regression table that contains multiple regression models, but am encountering this error:
Could you tell me what I ma doing incorrectly? I’ve updated asdoc.
Thank you!
Emily
Dr. Emily
Due to the complex structure of the mixed command, asdoc finds it difficult to parse the command. As an alternative, asdoc offers the replay command for such cases. See this example
Hi Dr. Shah,
Thank you for your excellent work on the asdoc program. It is very useful. I was wondering if it is possible to use value labels to regression of categorical values in asdoc? Sorry to bother you, but I have looked all over and can’t seem to find an answer. For example:
Is there a way to have asdoc code for Domestic/Foreign rather than 0b.foreign/1.foreign, or do I just have to replace all of the value labels manually? Thank you very much for your time.
Travis Petersen
This was implemented in the new version, available on my site. For example,
The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.
Please do remember to cite asdoc. To cite:
In-text citation
Tables were created using asdoc, a Stata program written by Shah (2018).
Bibliography
Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.
Hi Dr. Shah,
Thank you for your excellent work on the asdoc program. It’s amazing and very useful! I wonder if it is possible to use asdoc with xi command for logistic resgressions (and it will be great for nested regressions too)?
In fact when I use asdoc in this command
I have this message error: “sexe: string variables may not be used as factor variables”
Thanks a lot for your help and answer!!
For such complex syntax, you can use the replay option.
Greetings Prof.
I have run this regression
but I am getting this error
what does it mean and how to solve it
Julian Lucas
It seems that you have updated asdoc, however, the update was not successful. Some of the old files still exist after the update, therefore, you can re-install asdoc by typing the following lines in Stata command window.
Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.
Please do remember to cite asdoc. To cite:
In-text citation
Tables were created using asdoc, a Stata program written by Shah (2018).
Bibliography
Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.
Dear Professor,
Thanks for maintaining asdoc. I’m wondering if asdoc could modify the variable name in regression results? I check in help.doc but I didn’t find any options. For example, we may want to change the interaction term’s displayed name.
Brian
Thanks for asking. This option is currently not available in asdoc. I welcome patrons to finance specific additions to asdoc. If you are interested, please let me know and I shall work on this.
Dear Prof. Shah,
Thank you for a wonderful program! Can you tell me how to not put stars in the nested regression outputs? Even after adding “nostars” in the command, I see the stars in the output. Am I doing something wrong?
Regards
Hello Prof. Shah,
Is there a way of ensuring that the stars included in a regression output are attached to the regression coefficients and are not shown by themselves in a separate column? Thank you.
This is currently not included in the asdoc options. I have noted your point and shall consider it in future updates.
Thank you for this asdoc feature. Its such a great one.
I wish to find ot how to export my multinomial regression results reporting odds ratios to word.
The rests I have in word and the stata output are quite different so I dont know if I am doing something wrong.
Hey! Thank you for as doc feature, it is great!
I stumbled upon the inability to export my multinomial regression results in odds ratios. eform command doesn’t seem to work there. Or it is me not finding the answers?
Thank you very much for the nice package. I would like to report adjusted R-squared instead of R-squared. I used stat(r2_a) option; it adds the adjusted R-squared; however, what I have not figured out is how to drop R-squared from the table. Is there an option available to drop R-squared from the table?
Thank you.
Dear Prof. Shah,
thank you for this great tool, which is so helpful in writing research papers.
I am wondering if there is a possibility to add the “log-likelihood” value in a nested output of Logit-Regressions? Can I add any prefix in the stat() command?
Best, Niklas
Niklas Kur
You can add any regression statistics to the nest table using the stat() option. The log likelihood value is stored in the macro e(ll), therefore, we need to just use the option stat(ll). See this example:
Dear Dr. Shah,
I have on issue regarding the
R2
in my regression table. Below my codes to generate the table. I am getting thePseudo R2
with.z
written as a result not the number. However, I want to demonstrate withinR2
results from my fixed-effects estimation results. How can solve this issue?asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits, replace cnames(I) save(FE) nest asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits vaac bitsvaac, cnames(II) save(FE) nest asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits polsta bitspolsta , cnames(III) save(FE) nest asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits law bitslaw, cnames(IV) save(FE) nest asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits corrup bitscorrup, cnames(V) save(FE) nest asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits regulator bitsregulator, cnames(VI) save(FE) nest asdoc xtreg fdi lrpop lremp lrgdp lropennes lroilrez lrgasrez lrbits govef bitsgovef, cnames(VII) save(FE) nest
Fidan, asdoc reports
R2
correctly with thextreg
command. You may like to send your sample to me for debugging. In case you want to report thewithin R2
manually, you can add the optionstata(r2_w)
. See this example:Hello Prof.
Thank you for a very helpful package, I’m using it for my thesis and I shall cite it as you have stated.
I’m working on nested logistic regression (OR), currently it shows under parenthesis the SE, I want it to show the 95% CI instead, i tried using the level(95) command but no luck.
asdoc logit EVever i.age i.preg i.res i.wfam eduyf i.fwork ib3.wealth i.fbeatjust i.fnosexjust ib2.gtotgr, or nest fs(8) level(95) label replace
Is there a way to have nested regressions with CI instead of SE?
Thanks again!
Dear Prof,
Could you please help me how I can have frequencies and percentages in separate columns while I am conducting cross tabulation. Eg:
sysuse auto
asdoc tab rep78 foreign, row
Currently, this is not possible in asdoc. However, one can create a template for it in asdocx. See more details related to asdocx here https://fintechprofessor.com/asdocx/
Dear Dr. Shah,
I am wondering if asdoc can produce regression results with t-stat on the side (in a different column next to coefficient).
sysuse auto, clear
asdoc reg price mpg rep78, replace reset nest stat(r2_a) t(side)
I want to create a table with a t-stat on the next column but not below the coefficient. Also, if I want to report only Adj. R2 but R2, what option should I use?
Thank you.
AP
Respected Shah
needs help gmm two-step analysis please guide me
Hello,
I d need the table that asdoc reports to have the p-value instead standard deviation in parenthesis. Is there an option for that? I d also need the reggression to have a line in which a test is included. More specifically Hausman and AR(2) test for then panel data fixed effects reggresion
This is available asdocx, that is a premium version of asdoc. See this link for example https://fintechprofessor.com/asdocx/examples/regressions/nested/sideways/