Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • esttab on beamer

    Hi,

    When I use esttab output (in red) in the beamer, I am heaving a lot of errors.

    Illegal parameter number in definition of \test.
    <to be read again>
    1
    l.501 \end{adjustbox}


    Is this the correct way to do this?

    Thank you in advance for your suggestions...
    NK

    \begin{frame}\frametitle{GMM- High/Medium/Low Exporters}
    \begin{center}
    \begin{adjustbox}{max width=\textwidth}
    \scriptsize
    {
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \begin{tabular}{l*{3}{c}}
    \hline\hline
    &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\ multicolumn{1}{c}{(3)}\\
    &\multicolumn{1}{c}{Log (Real Exports)}&\multicolumn{1}{c}{Log (Real Exports)}&\multicolumn{1}{c}{Log (Real Exports)}\\
    \hline
    L.Log (Real Exports)& 0.21\sym{***}& 0.21\sym{***}& 0.20\sym{***}\\
    & (6.51) & (6.47) & (6.38) \\
    [1em]
    REER Volatility & -1.07 & -1.05 & -1.00 \\
    & (-1.23) & (-1.21) & (-1.16) \\
    [1em]
    REER Change & -0.41\sym{***}& -0.20\sym{*} & -0.32\sym{***}\\
    & (-4.48) & (-1.66) & (-4.03) \\
    [1em]
    High Exporter * REER Change& 0.23\sym{*} & & \\
    & & & (0.03) \\
    \hline
    Observations & 20769 & 20769 & 20769 \\
    \hline\hline
    \multicolumn{4}{l}{\footnotesize Marginal effects; \textit{t} statistics in parentheses}\\
    \multicolumn{4}{l}{\footnotesize (d) for discrete change of dummy variable from 0 to 1}\\
    \multicolumn{4}{l}{\footnotesize \sym{*} \(p<0.10\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\)}\\
    \end{tabular}
    }


    \end{adjustbox}
    \end{center}
    \end{frame}



  • #2
    Nazli,

    LaTex is a tricky and very susceptible tool. It is already hard to find the origins of the issue when having the complete file, here it will be impossible, since we don't know how you are compiling your Tex file.

    However, it is certainly more a Tex issue than a Stata one (and therefore few people in here would/could help). The more probable is that you are calling packages that are not installed on your compiler (such as the adjustbox package).
    The easiest solution for you would be to use the same tex preamble that already worked for previous people. (See for example this Statalist archive).
    It also seems easier to write the table in a separate .tex file, and then use \input{table.tex}, since this solution is also suggested in this repec page dedicate to estout :

    I copy here the Latex example from the page I just quote :

    Stata code :
    Code:
    . sysuse auto,clear
    
    . eststo: quietly regress price weight mpg
    
    . eststo: quietly regress price weight mpg foreign
    
    . esttab using example.tex, label title(Regression table\label{tab1})
    Then LaTex code :
    Code:
    \documentclass[8pt]{beamer}
    \usepackage[utf8]{inputenc}
    \begin{document}
    \begin{frame}
    \scriptsize
    \frametitle{Example}
    \input{example.tex}
    \end{frame}
    \end{document}
    If the table doesn't fit (that's perhaps why you used \adjustbox, and probably what's causing troubles), first make sure your audience wants/needs to see such a large table in one frame, and consider splitting it. Otherwise, some solution exists, but LaTex forums would answer to it better (and have already done here or here)

    Best,
    Charlie

    Comment

    Working...
    X