Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • asdoc: version update - New features of font, table header formatting, etc. Export results to Word from Stata

    Version 2.3.3.2, dated Feb 23, 2019, is finally here, thanks for Kit Baum for updating it on SSC. This new version brings significant improvements to existing routines and introduces a few new features. Summary of these is given below and details can be found on my webpage here. If you have not used asdoc previously, I would encourage you to read this half page quick start to asdoc.

    To update
    Code:
    ssc install asdoc, replace
    help asdoc
    New Features

    1. Font style

    2. Formatting the header row and header column

    3. Revamped the tabulation commands (really elegant tables now) - Watch YouTube Video

    4. Revamped the table command (really elegant tables now)

    5. Extending the detailed regression tables [ Read further details here]

    5.1 Added confidence intervals to the detailed regression tables
    5.2 Added an option for customizing the significance starts
    5.3 Added an option for suppressing significance stars
    5.4 Added an option for suppressing confidence intervals

    6. Adding support for macOS

    6. Improving the output from proportion command

    7. Support added for the logistic family of regressions

    8. Improving table outputs of non-standard outputs i.e. multilevel models

    9. eform() option added to nested tables




    Future Plans

    It is now almost a year in developing and constantly adding features to asdoc. I think I would stop here and start working on a premium version of asdoc that would be more flexible in making customized tables. It will also be able to export the output tables to Word, Excel, plain text, CSV, and LaTeX formats. I plan to name the premium version as asdocx.
    I would appreciate your suggestions and comments here on this post or sent directly to my email address attaullah.shah@imsciences.edu.pk

  • Pratap Pundir
    replied
    In fact, it would be amazing if you could somehow make asdoc work with putdocx, so that we can pick and choose the functions of each...then we can write nested tables to the file with asdoc and send the charts with putdocx into the same file.

    To be sure, it's not straightforward, since asdoc writes to the doc file on the go, while putdocx presumably stores the output in memory and sends to the word file all in one go...

    Leave a comment:


  • Pratap Pundir
    replied
    asdoc is so very helpful, especially with nested tables...I can't imagine the horror of doing nested tables manually (putdocx doesn't do nested tables). Much simpler than outreg2.

    It would be nice to be able to export charts. (if it can already do that, please share how, because the usual format of sticking a "asdoc" in front of the command doesn't seem to do it). I've tried with lroc, teffects overlap etc. putdocx shines here, as it is able to easily send charts to doc files.

    I particularly struggle with asdoc with marginsplot
    not only does asdoc not send marginsplot to doc file
    but it prevents marginsplot from running (marginsplot says that the previous command was not a margins command)...as a workaround, i run margins with asdoc first and then without asdoc before i run marginsplot.

    asdoc also seems to strucggle with pwcorr and ivreg2
    ivreg2 has become super important in the last 5 years or so, and compatibility with it would be highly appreciated.

    Finally, it would be nice if we didn't have to keep defining the output file in every single command.
    Let us declare the output file path name via a command, so that you can keep writing to that particular file till we provide another declaration for file path name.

    In terms of formatting suggestions, it would be nice to be able to tell asdoc the page size, margins, whether to include page numbers.
    Would be very cool to be able to define a "base" text size and then refer to text sizes in reference to this base size, like `em` in css.
    https://www.w3schools.com/cssref/css_units.asp

    Leave a comment:


  • Attaullah Shah
    replied
    Thanks for the suggestion, I have noted it.

    Leave a comment:


  • Pratap Pundir
    replied
    Can I tell asdoc the alignment of the text I am exporting?
    Code:
    asdoc, text(My text) fs(16) font(Garamond) align(center) replace save($workroot/asdoc.doc)
    didn't do the trick. Also tried fa, ta, ha, halign.

    Leave a comment:


  • Attaullah Shah
    replied
    This feature will be available in the premium version of asdoc. See details here
    https://fintechprofessor.com/stata-programs/asdocx/

    Leave a comment:


  • Claire Cui
    replied
    Thanks, Attaullah! I am wondering if it is possible to format the summary table. For example, I wanted to include commas in the summary stats (so it is 1,234 rather than 1234), using the following code doesn't seem to work.
    codes:
    Code:
    asdoc sum exp male, format(%12.2fc) replace

    Leave a comment:


  • Attaullah Shah
    replied
    Cosmin Sandulescu
    Thanks for your kind words. I never came across these commands and hence I am completely blank on how these are used and how the results are usually reported. I think I can start with small steps with your help. Therefore, if you can kindly show me:
    1. a command,
    2. some example dataset,
    3. and a manually formatted table of the results which I shall then try to use as a template for the given command.

    You can reach me at attaullah.shah@imsciences.edu.pk in this regard.

    Leave a comment:


  • Cosmin Sandulescu
    replied
    I want to thank you so much for your work and the willingness to share it with us. I am trying a way to export the tables from cs or ir commands, especially when I want to stratify it by other variables, but I found it very difficult. Do you have any plans to make it work with asdoc command? Thank you!

    Leave a comment:


  • Attaullah Shah
    replied
    In this blog post, I have shown how to report additional statistics with option add(). The idea is to write the required statistic to a macro and then add the description text, a comma, and the macro inside the add() option.

    So if we were to report the mean of the dependent variable (price in the following example), we would type:
    Code:
    sysuse auto, clear
    sum price
    loc value = `r(mean)'
    asdoc reg price weight trunk rep78, nest add(Mean of Price, `value') replace

    Leave a comment:


  • Pratap Pundir
    replied
    Originally posted by Attaullah Shah View Post
    Where do you want to report the sum of the lagged coefficients? Inside the regression table or outside?
    Inside, when I export the result to a nested table.

    Leave a comment:


  • Attaullah Shah
    replied
    Where do you want to report the sum of the lagged coefficients? Inside the regression table or outside?

    Leave a comment:


  • Pratap Pundir
    replied
    Originally posted by Pratap Pundir View Post
    If I am running a time-series or longitudinal regression with lags, e.g. l(0/12), is it possible to export a sum of the lagged coefficients?
    Attaullah?

    Leave a comment:


  • Pratap Pundir
    replied
    Originally posted by Pratap Pundir View Post
    Thanks! Now I am getting
    Code:
    func_nested_reg(): 3200 conformability error
    <istmt>: - function returned error
    Attaching do fine and data file: https://send.firefox.com/download/45...-V37Wne0evyyfQ
    Hmmm....looks like this problem occurs only if I run the file again. On closing Stata, and restarting Stata/do file, it ran just fine...

    But I do have another question: If I am running a time-series or longitudinal regression with lags, e.g. l(0/12), is it possible to export a sum of the lagged coefficients?

    Leave a comment:


  • Pratap Pundir
    replied
    Thanks! Now I am getting
    Code:
    func_nested_reg():  3200  conformability error  
                     <istmt>:     -  function returned error
    Attaching do fine and data file: https://send.firefox.com/download/45...-V37Wne0evyyfQ

    Leave a comment:

Working...
X