I'm pretty new to STATA and sure this is a basic concept I haven't grasped yet. I am trying to get a box plot with an accompanying table into a Word document. In the following program, writing the images to the file causes no issue. The portion to add the descriptive table aborts with the message, "last estimates not found." I've tried summarize and univar and they both abort with the same error. The online examples all show regress without any extra statements. Do I need to somehow save the estimates with these descriptive procedures so that putdocx will work?
Don't hesitate to point me to the right reference material and thanks in advance for your help.
Bob
putdocx begin
foreach var of varlist _all {
graph box `var'
graph export pix.png, replace
putdocx paragraph, halign(center)
putdocx image pix.png
putdocx paragraph
putdocx text
tabstat `var'
putdocx table mytable = etable
}
putdocx save test2.docx, replace
Don't hesitate to point me to the right reference material and thanks in advance for your help.
Bob
putdocx begin
foreach var of varlist _all {
graph box `var'
graph export pix.png, replace
putdocx paragraph, halign(center)
putdocx image pix.png
putdocx paragraph
putdocx text
tabstat `var'
putdocx table mytable = etable
}
putdocx save test2.docx, replace
Comment