Forum Replies Created

Viewing 15 posts - 46 through 60 (of 105 total)
  • Author
    Posts
  • Dr. Attaullah Shah
    Keymaster
    Post count: 106

    On your suggestion, I have added tableonly option for exporting a table when the file format is .tex. This option specifies that only the table be exported to the specified file. Therefore, the exported .tex file will start at \begin{tabularx} and end at \end{tabularx}.

    To update to the latest version, type:

    asdocx_update

    The latest version as of now is
    *! asdocx : June 18, 2021: Version 1.6.5 : tableonly option for LaTeX |

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Aduba Joseph
    Can you please specify the difference between the output by asdoc and asdocx. To me, they are pretty much similar.

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    asdocx now exports regression estimates from xtdpdgmm program.

    See the following example

    * First update asdocx
    asdocx_update
    
    * load example data
    webuse abdata
    
    * Estimate regression models and make nested output tables
    asdocx xtdpdgmm L(0/1).n w k, iv(L2.n w k, d) m(d) nocons nest replace
    asdocx  xtdpdgmm L(0/1).n w k, iv(L2.n) iv(w k, d) m(d) nocons nest
    
      0 |1                                      2                   3 
    ----+-----------------------------------------------------------------------------
      1 |                                     (1)                 (2) 
    ----+-----------------------------------------------------------------------------
      2 |                                L(0/1).n            L(0/1).n 
      3 |L.n                                0.151            1.094*** 
      4 |                                 (0.131)             (0.141) 
      5 |w                              -0.515***           -0.557*** 
      6 |                                 (0.051)             (0.076) 
      7 |k                               0.414***             0.135** 
      8 |                                 (0.047)             (0.056) 
      9 |Observations                         891                 891 
    ----------------------------------------------------------------------------------
    
    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Hello Cengiz
    Welcome to asdocx and this forum. For your pwcorr query, you can report full labels by using the option abb(.). see the following example:

    * First update asdocx
    asdocx_update
    
    * Load the nlsw88 data for our example
    sysuse nlsw88
    
    * Send the correlation results to Excel file, note the option abb(.)
    asdocx pwcorr, label replace abb(.) save(cor.xlsx)

    For the xtgpdgmm suggestion, please allow me some time so that I can explore the possibility of integrating it into asdocx.

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    The error occurs when you are trying to write more contents to the file with asdocx and the file is open in MS Word. When writing with asdocx, try to close the file first.

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Thanks for your feedback and appreciation. When I am using the following example, I do not get the mentioned error. Can you please update asdocx and try it again?
    asdocx_update

    Further, if the problem persists, then you should try changing the folder. The problem is possibly caused by a Dropbox / Google Drive / etc.

    Yet, if none of the above works, then you may kindly send the data and code so that i can replicate the issue at my end.

    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)
    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    I have added support for pperron test now in asdocx. You can update it now and try it. Here is a working example:

    First update asdocx

    asdocx_update
    use http://www.stata-press.com/data/r13/air2
    
    * To send the regression output to MS Word
    asdocx pperron air, lags(4) trend regress
    
    * To send the unit-root test results to MS Word
    * First get the matrix
    matrix A = r(cvalues)
    
    * Now send the matrix to Word
    asdocx wmat, mat(A)
    

    Here are the results

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Dear Dr Adam Hill. Please update asdocx with
    asdocx_update

    I have fixed the two mentioned issues. For reporting desired decimal places with the column of p-values, you can use the option dect(). The option dec() can be used to control decimal places in other parts of the table.

    sysuse auto
    asdocx reg price mpg trunk , template(reg1) replace dec(3) dect(4)

    For those who are not familiar with the reg1 template, they can follow this link.

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Hello Prof. Melse
    The text option works only with the docx files. If you want to add notes to the table, you can use the notes(my notes are here) option.

    asdocx_update
    sysuse auto
    asdocx sum, notes(My table notes are here) replace save(Myfile.xlsx)
    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Stata matrices have one limitation, and it is a big one. It cannot have string or text. Therefore, Stata matrices are not a good tool for holding and managing results. This is why I chose to write matrices in the Mata language. Still, you have not told why you need to add information to the Stata matrix?

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    By the way, why do you need to access this matrix. You can use flexmat to modify this matrix easily and the re-export to word. You might find this post helpful

    https://asdocx.com/flexmat-create-flexible-tables-in-stata-mata/

    https://www.statalist.org/forums/forum/general-stata-discussion/general/1598416-export-frequency-table

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    You are right, asdocx is not aware of community contributed commands. You can create a template file for this command or use our paid help for creating the template for you.

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Since you have not shared your dataset, therefore, I was unable to replicate the table you have posted. I am using the auot dataset in the following example to report six decimal points with the table command. As you can see from the output, the decmial points are reported as intended. You might like to share your dataset with me at attaullah.shah@imsciences.edu.pk so that I am able to replicate the error you are referring to.

    sysuse auto
    asdocx table rep78 foreign , c(mean mpg sd mpg) dec(6)
     ---+-----------------------------------------------------------------------------------
      1 |Rep1978                       Car type                 
    ----+-----------------------------------------------------------------------------------
      2 |                                                  Domestic         Foreign 
      3 | 1                                                      21               . 
      4 |                                                   4.24264               . 
      5 | 2                                                  19.125               . 
      6 |                                                  3.758324               . 
      7 | 3                                                      19        23.33333 
      8 |                                                  4.085622        2.516612 
      9 | 4                                                18.44445        24.88889 
     10 |                                                  4.585606        2.713137 
     11 | 5                                                      32        26.33333 
     12 |                                                  2.828427        9.367497 
    ----------------------------------------------------------------------------------------
    
    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    asdocx leaves behind a well-formed Mata matrix. The matrix name is output. Therefore, if you run asdocx with any Stata command, you can directly access the output matrix by typing

    mata:output

    And yes in the case of the tabstat command, asdocx leaves behind a Stata matrix. This matrix is named C and you can get it and modify it just like any other Stata matrix. So the display this matrix, you can type:

    matlist C 

    Or make a copy of it

    mat A = C
Viewing 15 posts - 46 through 60 (of 105 total)