asdocx: Export from Stata to Word, Excel, LaTeX & HTML › Forums › asdocx Forum › Does the asdocx command leave behind any matrix like in asdoc?
Bayzidur RahmanParticipantApril 14, 2021 at 11:06 amPost count: 3
Does the asdocx command generate any matrix is the asdoc?
I want to replicate the following commands with asdocx. Can you please help?
asdoc tabstat overall_pct overall_tot if pract==1 & dup==0, stats(mean min max) replace label matrix a=r(StatTotal)Dr. Attaullah ShahKeymasterApril 14, 2021 at 4:11 pmPost 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
outputmatrix by typing
And yes in the case of the
tabstatcommand, asdocx leaves behind a Stata matrix. This matrix is named
Cand you can get it and modify it just like any other Stata matrix. So the display this matrix, you can type:
Or make a copy of it
mat A = CBayzidur RahmanParticipantApril 19, 2021 at 12:01 amPost count: 3
Thanks, I got it.
However, the label of the variables are not saved in the matrix. That is my only reason to use asdocx. Can you please help me with this?Dr. Attaullah ShahKeymasterApril 19, 2021 at 12:03 amPost 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 helpfulBayzidur RahmanParticipantApril 19, 2021 at 12:06 amPost count: 3
Thanks for the information. I am not sure if I am missing something. Can we create a Stata matrix with flexmat? I can modify an Stata matrix with flexmat but that does not reman as a Stata matrix.Dr. Attaullah ShahKeymasterApril 19, 2021 at 12:08 amPost 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?
- You must be logged in to reply to this topic.