asdocx: Export from Stata to Word, Excel, LaTeX & HTML Forums asdocx Forum drop selected rows from tabulation table in Stata | asdocx

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Chanh Bao Lam
    Participant
    Post count: 3

    I have tried making tables with asdocx, they are really nice.

    One thing that I’m still not able to do is to report a selective number of values from my variables. I’m trying on the option “row” but do not really know how to use it properly.

    Please advise! I deeply appreciate it.

    asdocx tab schyear q11_final, b row ///
    	title(Table 11. Indicator 11 by Program Year) ///
    	fs_title(12)  save(UG_Program8.docx) ///
    	fs(10) dec(2) label replace
    

    asdocx drop row from tabulate stata
    The Total and those rows associated with the value 7 in the Program Year variable are deleted.

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Hello Chanh Bao Lam
    asdocx exports results not only to Word/Excel/LaTeX, but also keeps the formulated matrix on file, which we can modify as we may like. The asdocx matrix is shown on Stata screen with row and column numbering. These row and column numbering can be used to access the matrix parts. Therefore, if you wish to replace / delete columns/rows, you can use various sub-commands of flexmat (part of the asdocx package, type help flexmat to know more about it).

    In your specific query, you want to drop few rows. Rows can be dropped using the droprow sub-command, with option row(), in which we specify the row numbers. In the following example, I shall drop row 9 and 10, once the asdocx output is ready.

    asdocx tab schyear q11_final, b row ///
    	title(Table 11. Indicator 11 by Program Year) ///
    	fs_title(12)  save(UG_Program8.docx) ///
    	fs(10) dec(2) label replace
    
    asdocx droprow, row(9,10)
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.