Announcement

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

  • Wishlist for asdocx (A more versatile and flexible version of asdoc)

    I am developing a new version of asdoc that will be more versatile and flexible in terms of creating tables and exporting these tables to MS Word, Excel, LaTeX, and some other formats. I call this new version as asdocx. I have already received valuable input from the asdoc community. I hope to receive some more input here. I would appreciate it if you can list items that are in your WishList for asdocx.
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

  • #2
    Excel and LaTex have always been on my wishlist. I would like to see more examples of tables that can be produced using adsoc, particularly for panel data. I know this exists to some extent on your website and YouTube channel, but it's helpful (for me, at least) to see shells/code that I can repurpose in an organized fashion similar to the estout page.

    Comment


    • #3
      Thanks for your feedback. I have noted it.
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment


      • #4
        Thanks for your contributions. If I create a nested table for my regressions with asdocx, the file created by asdocx should be compatible with putdocx so that I can append different files using putdocx. I know that creating a nested table is complicated with putdocx, so asdocx is an optimal choice.

        Comment


        • #5
          We have promised our most significant data source that all released tables will have
          no fewer than 10 respondents in any cell.This is simple enough to enforce for a small
          user set, but we now have >200 users of this data, and the data source is requesting
          that all output taken away (even if just shown to the principal investigator) should
          be vetted by a staff person. That would be very expensive. I have been thinking that
          this could be partially automated. I did have a look at the -table- command, and I
          find that if I add:

          Code:
            tempvar numcat
            by `by': egen `numcat'=count(`new`i''!=0)
            by `by':replace `new`i''=.s if `numcat'<$mincellsize
          at the right spot in -collapse.ado- the -table- command will show a missing value in
          -table- output for small cells.* Unless something better comes along, I intend to
          pursue this line with other .ado commands. Something better would be -asdocx- that
          had a similar capability!

          *I do know about secondary suppression, a bug or feature of this patch is that it
          disables the row and col aggregation options. I also know that new commands need to be
          given new names and that Statacorp still owns the code. So far I am just experimenting.

          Comment


          • #6
            please consider hazard models such as stcox and stcrreg

            The current status is that I get the error below when I use nest option:

            depvar may not be a factor variable
            r(198);

            Comment


            • #7
              [email protected] Thanks for your input. I am a bit unclear about your suggestion for asdocx. Can you please elaborate it.
              Regards
              --------------------------------------------------
              Attaullah Shah, PhD.
              Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
              FinTechProfessor.com
              https://asdocx.com
              Check out my asdoc program, which sends outputs to MS Word.
              For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

              Comment


              • #8
                Thanks for taking an interest.

                We have a lot of confidential data. The data source lets us make tables and do regressions for publication, but they have always had rules for what would violate the confidentiality of the data and therefore could not be published. One agency has a pretty simple rule - no table cell can be based on less than 10 records. Currently users supervise themselves, but the agency would like all output be reviewed by a staff employee to ensure compliance with this rule. More importantly, they want this review for every piece of output that leaves the computer via printer or email, not just for output that will be presented to the public. Mostly this involves having the user make a table with N in addition to the table they wish to release and comparing the two, to make sure that the release table doesn't include any cells for which the other tables shows an N<10. It is fine to do this for a few tables, but if every user is going to have something to show their advisor every week, it is going to be a major burden on IT staff to review all the tables. So I would like to offer some commands that guarantee compliance and could be reviewed very quickly. (Just confirm that the appropriate command was used). In my experimental -table- the footer ".s signifes a cell with fewer than $mincellsize respondents" is appended, which is all the staff person would need to see to know the table was OK for release.

                Regression output is also a concern, I haven't really looked at that yet, but a dummy variable with fewer than 10 non-zero values would be cause the same concerns - we wouldn't be allowed to release the coefficient or standard error for that dummy. I expect handling factor variables will make for complications in programming.

                Cross-section and panel data used in economics is increasingly subject to disclosure rules like this - maybe not in your neck of the woods, but very common here.

                It is very rare that these rules prevent publication of something the researcher wants to publish, the negative effect is almost entirely is delaying research, so automating it is an attractive possibility.

                Other agencies have other rules - some require a restriction on the number of significant digits (not decimal digits) in released tables or have their own rounding rules and there are many variations. The minimum cell size can be 3 or 4 or 10. There are also rules about the share of cell total that can be attributed to the top k respondents, but those mostly don't affect us.

                Comment


                • #9
                  I already love asdoc. And would love asdox even more. Can you please add options to create a table of characteristics in the observational or clinical trial with P-values. Thanks in advance.

                  Comment


                  • #10
                    Thank you Youshida.
                    Regards
                    --------------------------------------------------
                    Attaullah Shah, PhD.
                    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
                    FinTechProfessor.com
                    https://asdocx.com
                    Check out my asdoc program, which sends outputs to MS Word.
                    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

                    Comment


                    • #11
                      Hello,
                      this is my suggestion https://drive.google.com/file/d/1Rn4sau4Muj_ygjzmdMQljGAqOBfiJHjP/view?usp=sharing

                      Comment


                      • #12
                        The picture has a low resolution, can you please explain what output do you expect from asdocx. Also, is this a generic format or some specific format that is likely to be rarely used?
                        Regards
                        --------------------------------------------------
                        Attaullah Shah, PhD.
                        Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
                        FinTechProfessor.com
                        https://asdocx.com
                        Check out my asdoc program, which sends outputs to MS Word.
                        For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

                        Comment


                        • #13
                          * Ejemplo generado por -dataex-. Para instalar: ssc install dataex
                          clear
                          input float (id nivedu) byte g_edad float pea byte p107 double facpob
                          21 3 2 1 2 1079.357428349185
                          9 4 2 1 1 1074.1349168687468
                          21 1 11. 2.
                          21 2 1 1 2 2268.03256090875
                          9 2 1 0 2891.5010674745525
                          9 3 2 1 1817.8623768544635
                          9 4 3 1 1229.5432503315545
                          9 1 3 1 1 519.509142954208
                          9 1 3 0 2211.10173502635908
                          21 4 3 3 2142
                          . 2. 1.
                          9 3 1 1 2886,179959378626
                          9 1 6. 1.
                          21 3 2 1 2 1002.4977245484666
                          9 2 1 1 1 356.72807138557715
                          9 1 2 0 2 759.2980452314417
                          21 2 3. 2 0
                          9 2 2 1 1800,7927908431465
                          21 1 13. 2.
                          9 2 1 1 1 795.253925745217
                          21 2 2 1 2 313.6101077681467
                          21 2 2 1 1 1052.3849176816568
                          9. 3. 1.
                          21 1 3 1 2 324.3408162620369
                          21 1 3 0 2 300.0563780077249
                          9. 3. 2.
                          21 2 1. 2 0
                          21 2 1 1 2 241,37398000227932
                          21 1 2 0 2 543,3059674370515
                          9. 1. 2.
                          9 2 1 0 1 356.72807138557715
                          9 2 3. 2.
                          21 1 8. 1.
                          9 2 1 0 1 807.3576302746677
                          9 2 2 1 1 817.8623768544635
                          21 2 3 1 2 719.3050239892455
                          9 1 12. 2.
                          9 4 3. 1 0
                          21 4 3 0 2 164,78706792662098
                          9 2 1 0 2 891,5010674745525
                          21 2 13. 2.
                          9 1 2 1 1 800.7927908431465
                          21 1 5. 1.
                          21 3 3 1 1 446.02453420169866
                          21 2 2 1 1 585.1050566102342
                          9 2 1 0 1 356.72807138557715
                          9 2 1 1 2 891.5010674745525
                          9 3 1. 1 0
                          21 3 3. 1 0
                          9 2 3 1 1 507.0768971622458
                          9 2 3 0 1 511.7207912611339
                          9. 1. 1.
                          9 4 3 0 2 637,0290059718216
                          9 3 3 0 2 637,0290059718216
                          9 1 5. 1.
                          9 2 1 0 2 891.5010674745525
                          9 2 2 0 2 752.4073740455839
                          21 4 2 1 1 2619.2145831954695
                          9 2 2 0 2 754.7660181558629
                          21 2 3 0 2 447.57346967300236
                          9 1 5. 2.
                          9 2 3 1 2 470.6091193195797
                          21 1 3 1 1 610.0924371182944
                          21 4 2 0 2 539.6787141745925
                          9 3 2 1 2 752.4073740455839
                          21 2 1. 1 0
                          21 2 1 0 1 762,405098587761
                          9 2 3 0 2 204,89955463380863
                          21 3 1 1 2 1,031.8515044644807
                          9 4 2 1 1 798,2903130497091
                          9 2 3 0 2 470,6091193195797
                          9 2 3 0 2 211,10173502635908
                          21 2 2 1 1 839,7920953806337
                          9 4 2 1 1 1,090.4831691392676
                          21 1 2 0 2 767,8000004209459
                          21 1 2 1 2 251,99697686080432
                          9. 0. 1.
                          21 3 3 0 2 329,57413585324196
                          9 2 3 0 2 204,89955463380863
                          21 4 1. 2 0
                          9 1 8. 2.
                          21 4 3 0 1 1350.3298653303248
                          21 2 1 0 2 1325.775283433986
                          9 4 3 1 2 477.7717544788737
                          21 2 1 1 1 746.5902996542206
                          9 1 3 0 2 477.7717544788737
                          21 2 2 1 1 634.2414791240 13303
                          21 4 38 1
                          21. 2. 1.
                          9 4 3 1 2 637.0290059718216
                          9 1 12. 1.
                          9 1 8. 1.
                          9 3 3 1 2 466,33831588651015
                          21 2 2 0 2 1352,5960587513014
                          21 1 9. 2.
                          9 2 1 0 1 790.5072885767529
                          9 2 1 1 2 886.179959378626
                          9 3 3 1 1 519.509142954208
                          21 1 8. 2.
                          9 2 2 1 2 759.2980452314417 valores de etiqueta
                          final
                          id id
                          etiqueta def id 9 "Trim Jul-Ago-Set19", modificar
                          etiqueta def id 21 "Trim Jul-Ago-Set20", modificar
                          valores de etiqueta nivedu nivedun
                          label def nivedun 1 "Prim. 1 / ", modificar
                          etiqueta def nivedun 2" Sec. ", Modificar
                          etiqueta def nivedun 3" Sup. No Univ. ", Modificar
                          etiqueta def nivedun 4" Sup. Universitaria ",

                          etiqueta def g_edad 1 "De 14 a 24 años", modificar
                          etiqueta def g_edad 2 "De 25 a 44 años", modificar
                          etiqueta def g_edad 3 "De 45 y más años", modificar
                          valores de etiqueta p107 etiquetas3
                          etiqueta def etiquetas3 1 "Hombre" , modificar
                          etiqueta def tags3 2 "Mujer", modificar


                          asdoc tab p107 id [iw = facpob] if pea == 1, reemplazar
                          asdoc tab g_edad id [iw = facpob] if pea == 1, reemplazar
                          asdoc tab nivedu id [iw = facpob] si pea == 1, reemplace
                          Attached Files

                          Comment


                          • #14
                            Code:
                              * Example generated by -dataex-. To install: ssc install dataex
                            clear
                            input float(id nivedu) byte g_edad float pea byte p107 double facpob
                            21 3  2 1 2  1079.357428349185
                             9 4  2 1 1 1074.1349168687468
                            21 1 11 . 2                  .
                            21 2  1 1 2   2268.03256090875
                             9 2  1 0 2  891.5010674745525
                             9 3  2 1 1  817.8623768544635
                             9 4  3 1 1  229.5432503315545
                             9 1  3 1 1   519.509142954208
                             9 1  3 0 2 211.10173502635908
                            21 4  3 1 2 492.86364219943704
                            21 .  2 . 1                  .
                             9 3  1 1 2   886.179959378626
                             9 1  6 . 1                  .
                            21 3  2 1 2 1002.4977245484666
                             9 2  1 1 1 356.72807138557715
                             9 1  2 0 2  759.2980452314417
                            21 2  3 . 2                  0
                             9 2  2 1 1  800.7927908431465
                            21 1 13 . 2                  .
                             9 2  1 1 1   795.253925745217
                            21 2  2 1 2  313.6101077681467
                            21 2  2 1 1 1052.3849176816568
                             9 .  3 . 1                  .
                            21 1  3 1 2  324.3408162620369
                            21 1  3 0 2  300.0563780077249
                             9 .  3 . 2                  .
                            21 2  1 . 2                  0
                            21 2  1 1 2 241.37398000227932
                            21 1  2 0 2  543.3059674370515
                             9 .  1 . 2                  .
                             9 2  1 0 1 356.72807138557715
                             9 2  3 . 2                  .
                            21 1  8 . 1                  .
                             9 2  1 0 1  807.3576302746677
                             9 2  2 1 1  817.8623768544635
                            21 2  3 1 2  719.3050239892455
                             9 1 12 . 2                  .
                             9 4  3 . 1                  0
                            21 4  3 0 2 164.78706792662098
                             9 2  1 0 2  891.5010674745525
                            21 2 13 . 2                  .
                             9 1  2 1 1  800.7927908431465
                            21 1  5 . 1                  .
                            21 3  3 1 1 446.02453420169866
                            21 2  2 1 1  585.1050566102342
                             9 2  1 0 1 356.72807138557715
                             9 2  1 1 2  891.5010674745525
                             9 3  1 . 1                  0
                            21 3  3 . 1                  0
                             9 2  3 1 1  507.0768971622458
                             9 2  3 0 1  511.7207912611339
                             9 .  1 . 1                  .
                             9 4  3 0 2  637.0290059718216
                             9 3  3 0 2  637.0290059718216
                             9 1  5 . 1                  .
                             9 2  1 0 2  891.5010674745525
                             9 2  2 0 2  752.4073740455839
                            21 4  2 1 1 2619.2145831954695
                             9 2  2 0 2  754.7660181558629
                            21 2  3 0 2 447.57346967300236
                             9 1  5 . 2                  .
                             9 2  3 1 2  470.6091193195797
                            21 1  3 1 1  610.0924371182944
                            21 4  2 0 2  539.6787141745925
                             9 3  2 1 2  752.4073740455839
                            21 2  1 . 1                  0
                            21 2  1 0 1   762.405098587761
                             9 2  3 0 2 204.89955463380863
                            21 3  1 1 2 1031.8515044644807
                             9 4  2 1 1  798.2903130497091
                             9 2  3 0 2  470.6091193195797
                             9 2  3 0 2 211.10173502635908
                            21 2  2 1 1  839.7920953806337
                             9 4  2 1 1 1090.4831691392676
                            21 1  2 0 2  767.8000004209459
                            21 1  2 1 2 251.99697686080432
                             9 .  0 . 1                  .
                            21 3  3 0 2 329.57413585324196
                             9 2  3 0 2 204.89955463380863
                            21 4  1 . 2                  0
                             9 1  8 . 2                  .
                            21 4  3 0 1 1350.3298653303248
                            21 2  1 0 2  1325.775283433986
                             9 4  3 1 2  477.7717544788737
                            21 2  1 1 1  746.5902996542206
                             9 1  3 0 2  477.7717544788737
                            21 2  2 1 1  634.2414791240689
                            21 4  3 1 1 1350.3298653303248
                            21 .  2 . 1                  .
                             9 4  3 1 2  637.0290059718216
                             9 1 12 . 1                  .
                             9 1  8 . 1                  .
                             9 3  3 1 2 466.33831588651015
                            21 2  2 0 2 1352.5960587513014
                            21 1  9 . 2                  .
                             9 2  1 0 1  790.5072885767529
                             9 2  1 1 2   886.179959378626
                             9 3  3 1 1   519.509142954208
                            21 1  8 . 2                  .
                             9 2  2 1 2  759.2980452314417
                            end
                            label values id id
                            label def id 9 "Trim Jul-Ago-Set19", modify
                            label def id 21 "Trim Jul-Ago-Set20", modify
                            label values nivedu nivedun
                            label def nivedun 1 "Prim. 1/", modify
                            label def nivedun 2 "Sec.", modify
                            label def nivedun 3 "Sup. No Univ.", modify
                            label def nivedun 4 "Sup. Universitaria", modify
                            label values g_edad g_edad
                            label def g_edad 1 " De 14 a 24 años", modify
                            label def g_edad 2 "De 25 a 44 años", modify
                            label def g_edad 3 "De 45 y más años", modify
                            label values p107 labels3
                            label def labels3 1 "Hombre", modify
                            label def labels3 2 "Mujer", modify
                            
                            
                            asdoc tab  p107 id [iw=facpob] if pea==1,   replace
                            asdoc tab  g_edad id [iw=facpob] if pea==1,   replace
                            asdoc tab  nivedu id [iw=facpob] if pea==1,   replace

                            Comment


                            • #15
                              Youshida Koki The requested table is now part of the asdocx package. You can read this page https://fintechprofessor.com/asdocx/...tients-asdocx/ for more details . A short summary is presented here. The table 1 template

                              The table1 template is an asdocx package that creates “Table 1”, i.e., patient baseline characteristics table commonly found in biomedical research papers. The template can summarize different types of variables such as continuous and categorical variables in a single table.

                              How to Use it

                              The template is free. However, it requires asdocx package, that is currently available at 80% discount for a limited time. To use this template, first you need to install it.
                              Code:
                               net install asdocx_addins, from(http://fintechprofessor.com/asdocxAddins) replace

                              After installation of the template, you can use the template as shown below.
                              Code:
                               * Load example dataset 
                              use http://fintechprofessor.com/asdocxAddins/table1.dta, clear  
                              
                              * Make table 1 using the template(table1) option 
                              
                              asdocx tab immigrant bone_arthritis bone_backspin              ///
                                     bone_backother bone_neck bone_fibro bone_lupus         ///
                                     bone_ehlers bone_deform bone_amp bone_burn nervous_ms  ///
                                     nervous_seizure nervous_park nervous_stroke           ///
                                     other_otherhealth other_anyother ,                   ///
                                     template(table1) table_layout(autofit) replace

                              Notes:

                              1. After the command tab, we shall use the treatment variable followed by all basic characteristics variables. We can add as many variables as needed.

                              2. Please note the text template(table1), addition of this option invokes the table1 template.

                              3. I am also using the option table_layout(autofit) to get a tight auto fit of contents for the table.

                              The template should generate a table as the one shown below:

                              Last edited by Attaullah Shah; 16 Jan 2021, 07:02.
                              Regards
                              --------------------------------------------------
                              Attaullah Shah, PhD.
                              Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
                              FinTechProfessor.com
                              https://asdocx.com
                              Check out my asdoc program, which sends outputs to MS Word.
                              For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

                              Comment

                              Working...
                              X