Announcement

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

  • Attaullah Shah
    replied
    Currently, asdoc does not support nested tables with margins, but I am working on it, the asdocx version will support it.

    Leave a comment:


  • Vince Vo
    replied
    Originally posted by Louis Boakye-Yiadom View Post
    I'm using Stata 15, and I'm trying to use the asdoc (a user-written programme) command to produce a nested table of marginal effects after executing the -probit- command. Any ideas on how I can do this? Thanks.
    I have the similar question. I am running logit model and would like to export marginal effects of different models. I arbitrarily tried asdoc before -margins- but it did not work (so I assume asdoc only works with direct estimation). Attaullah Shah hope to hear your advice.

    Code:
    clogit Response $As $Ps if Label==0, group(N_ID) vce(cluster UniqueID) 
    asdoc: margins, dydx ($As)
    Thanks.

    Leave a comment:


  • Rishi Kishore
    replied
    Dear Attaullah Shah ,
    Thank you for creating this user written code.
    Asdoc helped us a lot while working with the iweight.

    Now we are using svy command and pweight to generate various table. Currently we are facing issue with exporting those table, We checked different function on asdoc but nothing is working. It would be really helpful if you support us with the same. I am posting one syntax for your reference.
    Code:
    svyset id [pweight=trimweight], strata(dist_code)
    svy: tab area membersex if final_consent_code == 1, format(%11.3g) row // member

    It would be really helpful if you suggest how to export the table using asdoc, as we need to export 100s table so putexcel is also not very helpful.

    Thanks and Regards,
    Rishi

    Leave a comment:


  • Louis Boakye-Yiadom
    replied
    I'm using Stata 15, and I'm trying to use the asdoc (a user-written programme) command to produce a nested table of marginal effects after executing the -probit- command. Any ideas on how I can do this? Thanks.

    Leave a comment:


  • Bryony Simmons
    replied
    Hi, sorry if this question has already been answered - I want to use asdoc tabulate for a number of variables. Is there a way to get these in the same table? I try using rowappend but am not getting the desired result. For example:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(id a_present a_freq b_freq)
     1 0 0 0
     2 0 0 1
     3 1 2 2
     4 1 3 3
     5 1 1 3
     6 0 0 2
     7 1 2 1
     8 1 3 2
     9 1 1 1
    10 1 2 1
    end
    Code:
    asdoc tabulate a_present, replace save(dummyresults.rtf)
    asdoc tabulate a_freq, rowappend save(dummyresults.rtf)
    asdoc tabulate b_freq, rowappend save(dummyresults.rtf)
    This code produces 3 separate tables in my document. Is there a way to nest these so the output would look similar to this:

    Click image for larger version

Name:	dummy.png
Views:	1
Size:	20.8 KB
ID:	1543008

    Thank you for any help!


    Leave a comment:


  • Attaullah Shah
    replied
    This issue has been fixed in the recent update (Version 2.3.7.2: Changes made on March 19, 2020). The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
    Code:
    net install asdoc, from(http://fintechprofessor.com) replace
    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.

    Leave a comment:


  • Philipp Machauer
    replied
    Hello Attaullah Shah

    first of all: Thank you for the asdoc command, it almost works perfectly for me.

    I run xtpoisson for panel data and include the –irr option to show the incidence rate ratios. I also want to see these irr in the output created by asdoc. –eform should work, but I get the following error:
    Code:
    option or not allowed
    r(198);
    After searching through –help asdoc, I see no mention of eform either. In earlier forum posts by you however, you referenced it. Did you remove it?

    What can I do to show the incidence rate ratios in my word file?

    Thank you a lot for your help and have a nice day.

    Leave a comment:


  • Attaullah Shah
    replied
    I am working on asdocx, which will export to Excel. See details here http://fintechprofessor.com/asdocx

    Leave a comment:


  • Vince Williams
    replied
    Is it possible for asdoc to export to Excel or xml file instead of Doc. It will be more helpful?

    Leave a comment:


  • Attaullah Shah
    replied
    You can first write the desired statistics to a local before running asdoc. Later on pass that local to the add() options.

    Code:
    sum foreign if foreign ==1
    loc mean = `r(N)'
    asdoc reg price mpg, replace nest add(Foreign Obs., `obs')
    Click image for larger version

Name:	add with asdoc.PNG
Views:	1
Size:	33.0 KB
ID:	1540118

    Leave a comment:


  • Sofia Gori
    replied
    Dear Professor Shah,

    In first place, thanks for such an useful program as asdoc. I would like you to ask a question regarding regression tables. Now I have the following code:
    Code:
    asdoc reg re78 train age educ black hisp, nocons noci nonum nest append fhc(\b) save(TABLE_II) title(Table II)
    asdoc reg re78 train age educ black hisp re74 re75, nocons noci nonum nest append fhc(\b) save(TABLE_II) title(Table II)
    I would like to add at the bottom of my regression table the number of observations in the treatment group, possibly with the option add. Is there a way to do this without inserting the number manually?

    Regards,
    Sofia Gori

    Leave a comment:


  • Attaullah Shah
    replied
    Here are a few thoughts to get the mentioned table:
    1. Use the wide option of asdoc
    2. Use the nest option of asdoc
    3. Use option row() to create a customized table from scratch.

    1. Use the Wide table
    Code:
    global cnames coeff Constant t(const) t(var) r2
    asdoc logistic low age, t(side) stars wide replace add(age) cnames($cnames)
    asdoc logistic low lwt, t(side) stars wide add(lwd)
    asdoc logistic low smoke, t(side) stars wide add(smoke)
    asdoc logistic low ptl, t(side) stars wide add(ptl)
    Click image for larger version

Name:	wide.PNG
Views:	1
Size:	29.8 KB
ID:	1539195


    2. Use the nest option

    Code:
    asdoc logistic low age, nest replace 
    asdoc logistic low lwt, nest
    asdoc logistic low smoke, nest
    asdoc logistic low ptl, nest
    Click image for larger version

Name:	nest.PNG
Views:	1
Size:	35.8 KB
ID:	1539196


    3. Use option row for customized Table
    Option row() can be used to generate highly customized tables in any desired format. To get started, please read this blog article https://fintechprofessor.com/2018/09...stata-ms-word/

    Leave a comment:


  • Megan Moreton
    replied
    Hi - is there a way to produce a similar table, but of the results of several univariable models?

    ie, so that the following regressions would appear in one table, formatted as your table above?

    Code:
    asdoc logistic low age, or replace
    asdoc logistic low lwt, or
    asdoc logistic low i.race, or
    asdoc logistic low smoke, or
    asdoc logistic low ptl, or
    thank you for any help

    Leave a comment:


  • Attaullah Shah
    replied
    Yes, see this example

    Code:
    sysuse auto, clear
    asdoc reg price mpg headroom , label replace nest

    Leave a comment:


  • Satya Bhambhani
    replied
    Hi,
    Is there a way where "var labels" can be displayed using asdoc for "nested reg" output to word .doc?

    Leave a comment:

Working...
X