Three backslashes in outreg2 tex tables?

I am having problems with the user-written outreg2 package used by Stata. When I create output with the tex(frag) option, the resulting tables have three backslashes at the end of each row, not just two, which results in an “unulocal alignment” error for each row. Any ideas on what I'm doing wrong or how to fix it?

 (first regression specification) outreg2 d.lntau_sh d.lntau_sf using Table_1.tex, nocons replace (second regression second regression specification) outreg2 d.lntau_ht d.lntau_th using Table_1.tex, tex(frag) se coefastr symb(***,**,*) rdec(3) bdec(3) r2 nocons append 
+6
source share
3 answers

This answer applies to Windows. I ran into the same problem. This is similar to the latest version of outreg2 (outreg2 2.2.5 19mar2012). I fixed the problem as follows: open "C: \ ado \ plus \ o \ outreg2.ado" in Notepad; use CTRL + H to replace all instances of three backslashes with two backslashes (three instances must be replaced); save (CTRL + S).

+5
source

I ran your code (for the second regression) using automatic Stata data. I am not sure what error you are pointing out. I managed to create a pdf file from latex output.

................ Stata strong code> ................

 sysuse auto regress mpg foreign weight outreg2 using myfile2, tex(frag) se coefastr symb(***,**,*) rdec(3) bdec(3) r2 nocons append 

.......................... latex output ..................

 \documentclass[]{article} This is added \begin{document} This is added \begin{tabular}{lcc} \hline & (1) & (2) \\ VARIABLES & mpg & mpg \\ \hline & & \\ foreign & -1.650 & -1.650 \\ & (1.076) & (1.076) \\ weight & -0.00659*** & -0.007*** \\ & (0.000637) & (0.001) \\ Constant & 41.68*** & \\ & (2.166) & \\ & & \\ Observations & 74 & 74 \\ R-squared & 0.663 & 0.663 \\ \hline \multicolumn{3}{c}{ Standard errors in parentheses} \\ \multicolumn{3}{c}{ *** p$<$0.01, ** p$<$0.05, * p$<$0.1} \\ \end{tabular} \end{document} This is added 

........................ ...... pdf output from latex output .....

enter image description here

Note : you can remove the append parameter if you do not want the second column to be displayed.

+2
source

I had a similar problem and solved it by reinstalling the packages as follows:

 ado uninstall outreg ado uninstall outreg2 

and then install outreg2 again:

  ssc install outreg2 
0
source

Source: https://habr.com/ru/post/947619/


All Articles