# esttab output in Spanish (observations) using threeparttable and estwide or estauto

I am using the eststo and esttab commands to output regression results in .tex documents. I then use threeparttable (package threeparttablex) and \estwide to create and format the table in my LyX document (see Regression tables made with esttab in Stata have columns with different widths, using LyX in particular for the preamble). In LyX, I set the language to Spanish in Document/Settings

I am using those to write a report in Spanish, so I would like the "Observations" note, which is automatically created by esttab, to be in Spanish instead of English (I'd like it to say "Observaciones"). This is not a problem with other notes since I write them directly in LyX. Is there a solution to this by changing something in the preamble for example?

A MWE os such Stata code:

sysuse auto, clear
regress mpg weight length foreign, robust // specification without controls
eststo C1
regress mpg weight length, robust // specification with controls
eststo C2
regress price weight length foreign, robust // specification without controls
eststo C3
regress price weight length, robust // specification with controls
eststo C4

esttab C1 C2 C3 C4 using test.tex, booktabs fragment replace ///
se(%3.2f) b(3) label  indicate(Controls=foreign, labels("S\'i" "No")) ///
star(* 0.1 ** 0.05 *** 0.01) nonotes nomtitles drop(_cons) ///
mgroups("mpg" "weight", pattern(1 0 1 0) ///
prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))


And the correspondent output in TeX:

                    &\multicolumn{2}{c}{mpg}                    &\multicolumn{2}{c}{weight}                 \\\cmidrule(lr){2-3}\cmidrule(lr){4-5}
&\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         \\
\midrule
Weight (lbs.)       &      -0.004\sym{**} &      -0.004\sym{*}  &       5.775\sym{***}&       4.699\sym{***}\\
&      (0.00)         &      (0.00)         &      (1.50)         &      (1.73)         \\
Length (in.)        &      -0.083         &      -0.080         &     -91.371\sym{*}  &     -97.960\sym{*}  \\
&      (0.07)         &      (0.07)         &     (48.18)         &     (56.39)         \\
Controls            &         Yes         &          No         &         Yes         &          No         \\
\midrule
Observations        &          74         &          74         &          74         &          74         \\


Finally, my code in the LyX document:

\begin{threeparttable}
\estwide{test.tex}{4}{c}
\Figtext{\footnotesize{Errores est\'andares corregidos por correlaci\'on y heteroskedasticidad a nivel de escuela entre par\'entesis.\\ \textit{* p < 0.1, ** p <     0.05, *** p < 0.01.}}}
\end{threeparttable}

-
Never used those tools, and I don't really understand any of the involved syntax, but in its documentation there is an example which looks relevant. Apparently the command labels() can be used for changing those words. Search in the linked page for the word "Observations" and look at the fourth appearance. –  JLDiaz Mar 8 '13 at 8:26
Indeed, that was fairly easy. Only needed to add the command stats(N, labels("Observaciones")) to the esttab command. Sorry for not checking the documentation properly before asking, and thank you very much for pointing out the answer! –  Ines Mar 8 '13 at 14:07