Forum Replies Created
-
AuthorPosts
-
in reply to: Export only the table part of TEX #15839
On your suggestion, I have added
tableonlyoption 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.texfile 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 |Aduba Joseph
Can you please specify the difference between the output by asdoc and asdocx. To me, they are pretty much similar.asdocx now exports regression estimates from
xtdpdgmmprogram.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 ----------------------------------------------------------------------------------
Hello Cengiz
Welcome to asdocx and this forum. For yourpwcorrquery, 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
xtgpdgmmsuggestion, please allow me some time so that I can explore the possibility of integrating it into asdocx.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.
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_updateFurther, 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.
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, typehelp flexmatto know more about it).In your specific query, you want to drop few rows. Rows can be dropped using the
droprowsub-command, with optionrow(), 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)I have added support for
pperrontest 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

Dear Dr Adam Hill. Please update asdocx with
asdocx_updateI have fixed the two mentioned issues. For reporting desired decimal places with the column of p-values, you can use the option
dect(). The optiondec()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.
Hello Prof. Melse
The text option works only with the docx files. If you want to add notes to the table, you can use thenotes(my notes are here)option.asdocx_update sysuse auto asdocx sum, notes(My table notes are here) replace save(Myfile.xlsx)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?
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/
in reply to: Use asdocx with user-written command lgraph #15744You 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.
in reply to: asdocx dec(#) option is not working. #15743Since 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
tablecommand. 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 ----------------------------------------------------------------------------------------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 theoutputmatrix by typingmata:output
And yes in the case of the
tabstatcommand, asdocx leaves behind a Stata matrix. This matrix is namedCand 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
-
AuthorPosts