Announcement

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

  • Export table from mrtab to Word, Excel, LaTeX, HTML with asdocx

    For asdocx users and others who might be interested in mrtab and asdocx.

    mrtab is a community-contributed package written by Ben Jann. mrtab tabulates multiple responses which are stored as a set of variables. Users of asdocx have requested the addition of support for mrtab. Beginning with version 2.1.9, asdocx will now support mrtab, allowing users to export mrtab tables to Word, Excel, LaTeX, or HTML.

    A slightly modified version of mrtab is available on the asdocx website, which is automatically downloaded when a user first uses mrtab with asdocx. The modification is done to extract only the output matrix from mrtab and send it to asdocx, no other changes are made. Using mrtab with asdocx is simple; simply add ‘asdocx as a prefix to the mrtab command. Here is an example of using mrtab with asdocx.

    Code:
    * Load example dataset
     use http://fmwww.bc.edu/RePEc/bocode/d/drugs.dta, clear
     
    * asdocx with mrtab
    asdocx mrtab inco1-inco7, include cnames(Sources of income) ///
           title(Table: Multiple responses)
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	45.3 KB
ID:	1700905



    You may like to visit this page for more details and examples.
    Last edited by Attaullah Shah; 09 Feb 2023, 06:19.
    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
    I am grateful for the addition of mrtab to asdocx. I can now easily export multiple responses to Excel. However, I have found that the -if- condition does not work properly.

    Comment


    • #3
      Hello Liliani
      Thank you for the feedback. I've addressed the issue, and asdocx mrtab now works with the 'if' qualifier. To obtain the updated version, please type:
      Code:
      asdocx_update
      Here is an example of using if with asdocx mrtab:
      Code:
      * Load drugs data from the web
      use http://fmwww.bc.edu/RePEc/bocode/d/drugs.dta, clear
      
      * run mrtab with asdocx and export 
      asdocx mrtab inco1-inco7 if city != 1, include cnames(Sources of income) ///
                 title(Table: Multiple responses)  replace nonames
      Click image for larger version

Name:	mrtab asdocx.PNG
Views:	1
Size:	140.0 KB
ID:	1724749
      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