Announcement

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

  • Attaullah Shah
    replied
    Chen Samulsion You are absolutely right. Getting Chinese characters in an RTF file is a pain in the neck. Usually, getting Chinese characters programmatically into an RTF file does not seem straightforward, one has to first convert the letters to Unicode and then render it properly in the RTF file. Doing all these seems a little off for me given the scope of asdoc.

    Leave a comment:


  • Chen Samulsion
    replied
    Dear Attaullah Shah, thank you for writting -asdoc- command. A simple question: can asdoc support Chinese letters?
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte firmtype
    1
    5
    5
    1
    1
    5
    4
    6
    7
    4
    4
    1
    4
    1
    4
    8
    5
    4
    4
    1
    end
    label values firmtype firmtype
    label def firmtype 1 "国有企业", modify
    label def firmtype 4 "有限责任公司", modify
    label def firmtype 5 "私营企业", modify
    label def firmtype 6 "中外合资企业", modify
    label def firmtype 7 "外商独资企业", modify
    label def firmtype 8 "其他", modify
    
    asdoc tabulate firmtype, replace
    Click image for larger version

Name:	asdoc.png
Views:	1
Size:	10.5 KB
ID:	1470486

    Leave a comment:


  • Ritika Khurana
    replied
    Thank You so much Dr. Shah that was helpful!

    Leave a comment:


  • Attaullah Shah
    replied
    Ritika Khurana this YouTube video might be helpful for you.

    Leave a comment:


  • Ritika Khurana
    replied
    I found it in this thread it self. Thank you so much for writing this comprehensive package.

    Leave a comment:


  • Ritika Khurana
    replied
    Dear Dr. Shah,

    You replied to one of my queries on Statalist on exporting variables. I used it extensively in my work. Thank you. But, I have a question for you.
    I read and re-read this user written command on help but I couldn't find a way to bring many regressions together in one Table. Regressions with many variables same across all these regression.

    Could you please tell me if that is possible with some option?

    Looking forward to hearing from you.

    Thanks,

    Ritika

    Leave a comment:


  • Attaullah Shah
    replied
    Marcus Lopes Adding confidence intervals to the regression tables is on my agenda for the next update. So do check out updates of asdoc after a month or so.

    Leave a comment:


  • Marcus Lopes
    replied
    Thank you for all this effort. Its a great package.
    The only limitation for me is that I am trying to report the confidence intervals in my proportions and regression tables, but I could not figure if this was already implemented.

    Leave a comment:


  • Attaullah Shah
    replied
    Xuejie Ding Thanks for your feedback. I updated asdoc today to version 2.20 to fix some minor bugs as well as add support for ivregress. So asdoc can now support ivregress command concerning the detailed regression tables, the nested tables, and the wide tables. See the following examples.

    1. Detailed regression table
    Code:
    * First to update
    ssc install asdoc, replace
    
    * Load example data
    webuse hsng2
    
    * Detailed regression table (default option in asdoc)
    asdoc ivregress 2sls rent pcturban (hsngval = faminc i.region), replace
    Click image for larger version

Name:	asdoc ivregress detailed regression.png
Views:	1
Size:	27.4 KB
ID:	1467171




    2. Nested regression table
    Code:
    * nest three regression models
    asdoc ivregress 2sls rent pcturban (hsngval = faminc i.region), replace nest
    asdoc ivregress 2sls rent pcturban popgrow (hsngval = faminc i.region),  nest
    asdoc ivregress 2sls rent pcturban popden popgrow (hsngval = faminc i.region),  nest
    Click image for larger version

Name:	asdoc ivregress nested table.png
Views:	1
Size:	28.4 KB
ID:	1467172




    3. Wide regression table
    Code:
    asdoc ivregress 2sls rent pcturban (hsngval = faminc i.region), replace wide
    asdoc ivregress 2sls hsng pcturban (hsngval = faminc i.region),  wide
    asdoc ivregress 2sls pop pcturban (hsngval = faminc i.region),  wide 

    Click image for larger version

Name:	asdoc ivregress wide regression.png
Views:	1
Size:	13.8 KB
ID:	1467173


    asdoc can report results from multi-level models, but the output is not properly formatted because many of these models do not have a standard regression output.

    Leave a comment:


  • Xuejie Ding
    replied
    Thank you for sharing, this is super useful! Does this also apply to 2sls and multilevel models?

    Leave a comment:


  • Rodrigo Badilla
    replied
    Thanks for you reply!

    your explanation work great!

    To get result from a 2x2 tab Iam trying with matrix, example:

    HTML Code:
    sysuse auto, clear
    asdoc tab rep78 foreign matcell (x)
    matrix list x
    mata : st_matrix("x", max(st_matrix("x")))
    matrix list x
    
    symmetric x[1,1]
    
        c1
    r1  27


    Regards and thanks!
    Last edited by Rodrigo Badilla; 22 Oct 2018, 09:40.

    Leave a comment:


  • Attaullah Shah
    replied
    For point 1, I would appreciate if you provide an example data set and the exact command that you use for exporting the results to Word file.

    2. Two-way frequency tables have only the following stored results. So I am not sure which of these do you want to send to the file using the text() options.
    Code:
     ret li
    
    scalars:
                      r(N) =  69
                      r(r) =  2
                      r(c) =  5
    If you are trying to send the number of observation or any other stored results, then please note that the tab command is called from within asdoc, therefore any macro created by the tab command is local to asdoc and is deleted when asdoc closes. Therefore, the trick is to call the tab command outside asdoc and then write its stored results. So
    Code:
    sysuse auto, clear
    asdoc tab rep78 foreign, replace
    tab rep78 foreign
    asdoc, text(In this dataset, there are `r(N)')
    3. The default for table title is to write it just above the table. However, if you want some spaces between the table title and the table, then you can use option text() with some RTF control words to change the formatting of the text. See the following example. Please note that the \fs28 will write the text with a font size of 14pt. \b makes the text bolder. The text(\) enters two empty lines. And title(\) actually enters an empty title over the table.
    Code:
    asdoc, text(\fs28 \b Table: Tabulation Results) replace
    asdoc, text(\)
    asdoc, text(\)
    asdoc tab rep78, title(\)
    Click image for larger version

Name:	tabulation.png
Views:	1
Size:	13.5 KB
ID:	1466811



    4. I have noted this and will include an option in the next update for making the title column bolder.
    Last edited by Attaullah Shah; 21 Oct 2018, 08:10.

    Leave a comment:


  • Rodrigo Badilla
    replied
    I am sorry, I am try to replicate your example using tabulate, lamentably this dont work:

    sysuse auto, clear
    asdoc tab rep78 foreign, replace
    asdoc, text(In this dataset, there are `r(N)')

    Tabulation of rep78 foreign
    Record Car type
    1978 Domestic Foreign Total
    1 2 0 2
    2 8 0 8
    3 27 3 30
    4 9 9 18
    5 2 9 11
    Total 48 21 69
    In this dataset, there are

    Text dont show the N.

    Leave a comment:


  • Rodrigo Badilla
    replied
    Thanks! your package its great!

    I have some questions about asdoc:

    1. How set the column width for variables names so long, i did use cs(15) but lamentably dont work.

    2. Its posible get the stored frequency value for a 2x2 cross table:

    tabulate var1 var2:
    asdoc, text(In this dataset, the frequency var1 vs var2 is `????')

    3. How can add lines between title´s table and table?, when you include title in options

    asdoc tab var1, title(Title)

    4. and last: could get bold font to the head columns in a table? Thanks in advaance in congratulations for your package, I only discover it this weekend and I am using now!. Regards
    Last edited by Rodrigo Badilla; 21 Oct 2018, 06:38.

    Leave a comment:


  • Attaullah Shah
    replied
    Rodrigo Badilla are you asking for something like this?
    Code:
    asdoc summarize mpg, replace
    asdoc, text(In this dataset, there are `r(N)')
    Click image for larger version

Name:	asdoc sum text.png
Views:	1
Size:	15.0 KB
ID:	1466788

    Last edited by Attaullah Shah; 21 Oct 2018, 02:44.

    Leave a comment:

Working...
X