1

I'm trying to find a way to cite my equation as a note under the table here the code

\documentclass{article}
\usepackage[margin=2.5cm,a4paper]{geometry} % set page parameters suitably
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage[skip=1ex]{caption}
\usepackage{natbib}
\usepackage{amsmath}
\usepackage{amsthm} 
\usepackage[protrusion=true,expansion=true]{microtype} 
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{enumerate}
\usepackage{placeins}
\usepackage{varioref}
\usepackage{float}
\usepackage{cuted}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}       
\usepackage[figurename=Fig.]{caption}
\usepackage{booktabs, makecell, multirow, threeparttable}
\usepackage{caption}
\usepackage{xparse}    
\usepackage{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref} 
\usepackage{xstring}
\usepackage{xfrac}
\usepackage{nicefrac}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage{relsize}
\usepackage{booktabs, makecell}
\usepackage[referable]{threeparttablex}
\usepackage{siunitx}
\usepackage[skip=1ex]{caption}
\usepackage{booktabs, makecell}
\usepackage[referable]{threeparttablex}
\usepackage{booktabs,dcolumn}
\usepackage{multirow, booktabs, makecell, caption}
\usepackage{threeparttable}
\usepackage{siunitx}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \renewcommand{\theadfont}{\small\bfseries}
  \captionsetup{font=bf}
  \newcommand{\Risk}{\mathop{\textnormal{\slshape Risk}}\nolimits}
  \newcommand{\CEOPC}{\mathop{\textnormal{\slshape CEO\_PC}}\nolimits}
  \newcommand{\Boardind}{\mathop{\textnormal{\slshape Board\_ind}}\nolimits}
  \newcommand{\OP}{\mathop{\textnormal{\slshape OP}}\nolimits}
  \newcommand{\OF}{\mathop{\textnormal{\slshape OF}}\nolimits}
  \newcommand{\Zscore}{\mathop{\textnormal{\slshape Z\_Score}}\nolimits}
  \newcommand{\NPLs}{\mathop{\textnormal{\slshape NPLs}}\nolimits}
 \newcommand{\NPL}{\mathop{\textnormal{\slshape NPL}}\nolimits}
 \newcommand{\LnZ}{\mathop{\textnormal{\slshape Ln\_Z}}\nolimits}
 \newcommand{\LnZscore}{\mathop{\textnormal{\slshape LnZ\_score}}\nolimits}
\newcommand{\LTS}{\mathop{\textnormal{\slshape LTS}}\nolimits}
\newcommand{\EA}{\mathop{\textnormal{\slshape EA}}\nolimits}
\newcommand{\LT}{\mathop{\textnormal{\slshape LT}}\nolimits}
\newcommand{\PF}{\mathop{\textnormal{\slshape PF}}\nolimits}
\newcommand{\EF}{\mathop{\textnormal{\slshape EF}}\nolimits}
\newcommand{\LV}{\mathop{\textnormal{\slshape LV}}\nolimits}
\newcommand{\LGI}{\mathop{\textnormal{\slshape LGI}}\nolimits}
 \newcommand{\AGI}{\mathop{\textnormal{\slshape AGI}}\nolimits}
\newcommand{\DD}{\mathop{\textnormal{\slshape DD}}\nolimits}




 \begin{document}

\\ we use the following model

 \begin{equation}
   \Risk_{i,t} = c + &\alpha \Risk_{i,t-1} + \beta_{1}\CEOPC_{i,t} + \beta_{2}\Boardind_{i,t} + 
 \beta_{k}\Controls_{i,t}+\epsilon_{i,t}\label{eq:1}
  \end{equation}

\\ \Cref{tab2} presents the regression results :

   \begin{table}[h]  
    \sisetup{table-format=-1.3, 
            table-number-alignment=center, 
             table-space-text-pre =(, 
             table-space-text-post=$^{***}$, 
            table-align-text-pre=false, 
           table-align-text-post=false}
    \centering          
   \caption{Risk}
   \label{tab2}
   \begin{threeparttable}
   \begin{tabular*}{\textwidth}{c@{\extracolsep{\fill}}*{2}{S}}
   \toprule
    \thead{Variable} & {\thead{\NPLs}} & {\thead{\LnZscore}} \\
   \midrule
  \multirow{2}[1]{*}{Constant} & -0.1064\tc{***} & 5.0727\tc{***} \\
  \multicolumn{1}{c}{}         & {(}-3.42{)} & {(}5.35{)} \\    
  \addlinespace
   \multirow{2}[0]{*}{$\NPL$_{i,t-1}$$} & 0.021\tc{***}   & \\
   \multicolumn{1}{c}{}              & {(}5.73{)}  & \\
   \addlinespace
   \multirow{2}[1]{*}{$\LnZ$_{it-1}$$} &     &  0.1452\tc{***} \\
   \multicolumn{1}{c}{}               &     & {(}5.83{)} \\
 \addlinespace
   \multirow{2}[1]{*}{$\CEOPC$_{it}$$} & 6.4521\tc{***}   & 0.0124 \\
    \multicolumn{1}{c}{}                 & {(}11.14{)} & {(}1.12{)} \\  
 \addlinespace
   \multirow{2}[1]{*}{$\Boardind$} & -0.1452\tc{**}    & -0.1245\tc{***}  \\
   \multicolumn{1}{c}{}             & {(}-2.11{)} & {(}-8.25{)} \\              
\addlinespace
\multirow{2}[1]{*}{$\OF$} & -0.0103\tc{***}  & 0.0345\tc{**} \\
\multicolumn{1}{c}{}         & {(}-2.45{)} & {(}2.33{)} \\              
  \addlinespace
  \multirow{2}[1]{*}{$\OP$} & -0.1445\tc{*}    & 0.1478\tc{*} \\
  \multicolumn{1}{c}{}         & {(}-1.91{)} & {(}1.90{)} \\            
  \addlinespace
   \multirow{2}[1]{*}{$\LTS$} & 0.1019\tc{**}    &-0.2645\tc{***} \\
   \multicolumn{1}{c}{}     & {(}2.45{)} & {(}-3.47{)} \\       
 \addlinespace
  \multirow{2}[1]{*}{$\EA$} & 0.2114 & 0.4789 \\
   \multicolumn{1}{c}{} & {(}1.03{)} & {(}0.10{)} \\                
 \addlinespace
  \multirow{2}[1]{*}{$\LT$} & -0.1478\tc{*} & -0.2010\\
   \multicolumn{1}{c}{} & {(}-0.45{)} & {(}-0.14{)} \\
 \addlinespace
  \multirow{2}[1]{*}{$\PF$} & -0.5240\tc{*} & -0.0520 \\
  \multicolumn{1}{c}{} & {(}-3.06{)} & {(}-1.24{)} \\                   
 \addlinespace
  \multirow{2}[1]{*}{$\EF$} & 0.0120 & -1.2322\tc{***} \\
   \multicolumn{1}{c}{} & {(}4.20{)} & {(}-2.20{)} \\
\addlinespace
  \multirow{2}[1]{*}{$\LV$} & -0.1478\tc{***} &  \\
  \multicolumn{1}{c}{} & {(}-11.02{)} &  \\ 
 \addlinespace
   \multirow{2}[1]{*}{$\LGI$} & 0.1247 &  \\
   \multicolumn{1}{c}{} & {(}0.2010{)} &  \\    
  \addlinespace
  \multirow{2}[1]{*}{$\AGI$} &  & 0.0012\tc{***} \\
  \multicolumn{1}{c}{} & & {(}0.1478{)} \\  
 \addlinespace
  \multirow{2}[1]{*}{$\DD$} &  & 0.14789 \\
  \multicolumn{1}{c}{} &  & {(}0.01236{)} \\    
  \midrule
    Year dummy & \multicolumn{2}{c}{Yes} \\
        \addlinespace
       \multirow{2}[1]{*}{R$^2$} &   -1.156 &  -2.452 \\
       \addlinespace
    \multirow{2}[1]{*}{Adjusted R$^2$} &   0.652 & 1.562 \\
    \addlinespace
    \multirow{2}[1]{*}{Sargan test} & 12.02\tc{***} &41.02\tc{***} \\
    \addlinespace
\bottomrule
\end{tabular*}
\begin{tablenotes}[para,flushleft]
\footnotesize\smallskip
   \item\hspace{-2.5pt}\noindent\textit{Note:} This table reports SGMM estimation results of $\label{eq:1}$ where non-performing loans to total loans (\NPL), and Z-score (\LnZ) are the endogenous variables for bank $i$ and year $t$. The $\NPL$_{i,t-1}$ and $\LnZ$_{it-1}$ are lagged dependent variables. $\OP$ and $\OF$ is the independent PRIVATE (DUMMY), FOREIGN (DUMMY), passive shareholding (\PF), minority active shareholding (\EF) and active shareholding (\LTS) are the main explanatory ownership variables. Bank size (\LTS), corporate governance (\EA), financial leverage (\LT) are bank level control variables; and growth of product (\LGI), rate of inflation (\AGI) are two macro-economic control variables. T-statistics are between parentheses; \enspace *** $p < 0.01$; \enspace ** $p < 0.05$;\enspace * $p < 0.10$. The Sargan test justifies the validity of the over identifying restrictions.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
11
  • As a start: Remove the two instances of \\ that are outside of the table. Also remove the & in the equation. Please add the definition of \Controls.
    – leandriis
    Jul 21, 2020 at 12:40
  • \NPLs and \LnZscore can only be used in math mode, you you can't use them in the table headers like you currently try to do. Something like \thead{Variable} & {\thead{\(\NPLs\)}} & {\thead{\(\LnZscore\)}} should at least remove this error message. The same also applies to all the commands in your table note (such as \LTS, \AGI,...) Please fix that.
    – leandriis
    Jul 21, 2020 at 12:43
  • What is $\label{eq:1}$ supposed to do in the table notes? Probably you wanted to use \ref{eq:1} instead?
    – leandriis
    Jul 21, 2020 at 12:46
  • @leandriis Yes I want to reference EQ1
    – haithem
    Jul 21, 2020 at 12:47
  • How is the \tc command defined? Is it the definition Zarko showed you here: tex.stackexchange.com/a/553967/134144?
    – leandriis
    Jul 21, 2020 at 12:47

1 Answer 1

0

In the following MWE, I have done the following changes in comparison to the original code:

  • commented out duplicate package. Please only load packages once especially, avoid conflicting package options. I have also correctly placed hyperref at the end of the preamble.

  • removed the & in the equation and the occurences of \\ outside of the table

  • added the missing definitions of tc according to the comments and of \Controls according to my guess

  • added math-mode where needed and removed redundant $s

  • removed \multirow commands in the lower part of the table in order to fix the horizontal alignment

  • corrected the table-format option of sisetup according to the numbers that are present in the table

  • removed redundant \multicolumn{1}{c}{}

  • replaced the wrong $\label{eq:1}$ in the notes part with \cref{eq:1}.

Additionally to the above mentioned changes, I would also suggest to use a simple tabular for your table. Forcing the table wo be as wide as the textwidth introduces a lot of white space and makes the table harder to read. I also replaced the threeparttalbe's tablenotes environment with a simple minipage in order to make sure the notes part below the table stays as wide as the textwidth:

enter image description here

\documentclass{article}
\usepackage[margin=2.5cm,a4paper]{geometry} % set page parameters suitably
%\usepackage{booktabs} %<-- removed. don't load packages more than once!
\usepackage{siunitx}
%\usepackage[skip=1ex]{caption} %<-- removed. don't load packages more than once!
\usepackage{natbib}
\usepackage{amsmath}
\usepackage{amsthm} 
\usepackage[protrusion=true,expansion=true]{microtype} 
%\usepackage{multirow} %<-- removed. don't load packages more than once!
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{enumerate}
\usepackage{placeins}
%\usepackage{varioref} % <--- moved to the end of the preamble. Mind the correct load order
\usepackage{float}
\usepackage{cuted}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}       
\usepackage[figurename=Fig.]{caption}
\usepackage{booktabs, makecell, multirow, threeparttable}
%\usepackage{caption} %<-- removed. don't load packages more than once!
\usepackage{xparse}    
%\usepackage{hyperref} % <--- moved to the end of the preamble. Mind the correct load order
%\usepackage[nameinlink,noabbrev]{cleveref} % <--- moved to the end of the preamble. Mind the correct load order
\usepackage{xstring}
\usepackage{xfrac}
\usepackage{nicefrac}
\usepackage{dcolumn}
%\usepackage{booktabs}%<-- removed. don't load packages more than once!
\usepackage{relsize}
%\usepackage{booktabs, makecell} %<-- removed. don't load packages more than once!
\usepackage[referable]{threeparttablex}
%\usepackage{siunitx} %<-- removed. don't load packages more than once!
%\usepackage[skip=1ex]{caption} %<-- removed. don't load packages more than once!
%\usepackage{booktabs, makecell} %<-- removed. don't load packages more than once!
%\usepackage[referable]{threeparttablex} %<-- removed. don't load packages more than once!
%\usepackage{booktabs,dcolumn} %<-- removed. don't load packages more than once!
%\usepackage{multirow, booktabs, makecell, caption} %<-- removed. don't load packages more than once!
%\usepackage{threeparttable} %<-- removed. don't load packages more than once!
%\usepackage{siunitx} %<-- removed. don't load packages more than once!


\usepackage{varioref}
\usepackage{hyperref} 
\usepackage[nameinlink,noabbrev]{cleveref}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\theadfont}{\small\bfseries}
\captionsetup{font=bf}


\newcommand{\Risk}{\mathop{\textnormal{\slshape Risk}}\nolimits}
\newcommand{\CEOPC}{\mathop{\textnormal{\slshape CEO\_PC}}\nolimits}
\newcommand{\Boardind}{\mathop{\textnormal{\slshape Board\_ind}}\nolimits}
\newcommand{\OP}{\mathop{\textnormal{\slshape OP}}\nolimits}
\newcommand{\OF}{\mathop{\textnormal{\slshape OF}}\nolimits}
\newcommand{\Zscore}{\mathop{\textnormal{\slshape Z\_Score}}\nolimits}
\newcommand{\NPLs}{\mathop{\textnormal{\slshape NPLs}}\nolimits}
\newcommand{\NPL}{\mathop{\textnormal{\slshape NPL}}\nolimits}
\newcommand{\LnZ}{\mathop{\textnormal{\slshape Ln\_Z}}\nolimits}
\newcommand{\LnZscore}{\mathop{\textnormal{\slshape LnZ\_score}}\nolimits}
\newcommand{\LTS}{\mathop{\textnormal{\slshape LTS}}\nolimits}
\newcommand{\EA}{\mathop{\textnormal{\slshape EA}}\nolimits}
\newcommand{\LT}{\mathop{\textnormal{\slshape LT}}\nolimits}
\newcommand{\PF}{\mathop{\textnormal{\slshape PF}}\nolimits}
\newcommand{\EF}{\mathop{\textnormal{\slshape EF}}\nolimits}
\newcommand{\LV}{\mathop{\textnormal{\slshape LV}}\nolimits}
\newcommand{\LGI}{\mathop{\textnormal{\slshape LGI}}\nolimits}
\newcommand{\AGI}{\mathop{\textnormal{\slshape AGI}}\nolimits}
\newcommand{\DD}{\mathop{\textnormal{\slshape DD}}\nolimits}

\newcommand{\Controls}{\mathop{\textnormal{\slshape Controls}}\nolimits}
\usepackage{xcolor}
\newcommand\tc[1]{\textcolor{blue}{#1}}

\begin{document}

we use the following model

\begin{equation}
   \Risk_{i,t} = c + \alpha \Risk_{i,t-1} + \beta_{1}\CEOPC_{i,t} + \beta_{2}\Boardind_{i,t} + 
 \beta_{k}\Controls_{i,t}+\epsilon_{i,t}\label{eq:1}
\end{equation}

\Cref{tab2} presents the regression results :

\begin{table}[ht]  
\sisetup{table-format=-2.5,  % corrected values with respect to the numbers in your table
         table-number-alignment=center, 
         table-space-text-pre =(, 
         table-space-text-post=$^{***}$, 
         table-align-text-pre=false, 
         table-align-text-post=false}
\centering          
\caption{Risk}
\label{tab2}
\begin{tabular}{l*{2}{S}}
\toprule
\thead{Variable} & {\thead{$\NPLs$}} & {\thead{$\LnZscore$}} \\
\midrule
\multirow{2}[1]{*}{Constant}       & -0.1064\tc{***} & 5.0727\tc{***} \\
                                   & {(}-3.42{)}     & {(}5.35{)} \\    
\addlinespace
\multirow{2}[0]{*}{$\NPL_{i,t-1}$} & 0.021\tc{***}   & \\
                                   & {(}5.73{)}      & \\
\addlinespace
\multirow{2}[1]{*}{$\LnZ_{it-1}$}  &                 &  0.1452\tc{***} \\
                                   &                 & {(}5.83{)} \\
\addlinespace
\multirow{2}[1]{*}{$\CEOPC_{it}$}  & 6.4521\tc{***}  & 0.0124 \\
                                   & {(}11.14{)}     & {(}1.12{)} \\  
\addlinespace 
\multirow{2}[1]{*}{$\Boardind$}    & -0.1452\tc{**}  & -0.1245\tc{***}  \\
                                   & {(}-2.11{)}     & {(}-8.25{)} \\              
\addlinespace
\multirow{2}[1]{*}{$\OF$}          & -0.0103\tc{***} & 0.0345\tc{**} \\
                                   & {(}-2.45{)}     & {(}2.33{)} \\              
\addlinespace
\multirow{2}[1]{*}{$\OP$}          & -0.1445\tc{*}   & 0.1478\tc{*} \\
                                   & {(}-1.91{)}     & {(}1.90{)} \\            
\addlinespace
\multirow{2}[1]{*}{$\LTS$}         & 0.1019\tc{**}   &-0.2645\tc{***} \\
                                   & {(}2.45{)}      & {(}-3.47{)} \\       
\addlinespace
\multirow{2}[1]{*}{$\EA$}          & 0.2114          & 0.4789 \\
                                   & {(}1.03{)}      & {(}0.10{)} \\                
\addlinespace
\multirow{2}[1]{*}{$\LT$}          & -0.1478\tc{*}   & -0.2010\\
                                   & {(}-0.45{)}     & {(}-0.14{)} \\
\addlinespace
\multirow{2}[1]{*}{$\PF$}          & -0.5240\tc{*}   & -0.0520 \\
                                   & {(}-3.06{)}     & {(}-1.24{)} \\                   
\addlinespace
\multirow{2}[1]{*}{$\EF$}          & 0.0120          & -1.2322\tc{***} \\
                                   & {(}4.20{)}      & {(}-2.20{)} \\
\addlinespace
\multirow{2}[1]{*}{$\LV$}          & -0.1478\tc{***} &  \\
                                   & {(}-11.02{)}    &  \\ 
\addlinespace
\multirow{2}[1]{*}{$\LGI$}         & 0.1247          &  \\
                                   & {(}0.2010{)}    &  \\    
\addlinespace
\multirow{2}[1]{*}{$\AGI$}         &                 & 0.0012\tc{***} \\
                                   &                 & {(}0.1478{)} \\  
\addlinespace
\multirow{2}[1]{*}{$\DD$}          &                 & 0.14789 \\
                                   &                 & {(}0.01236{)} \\    
\midrule
Year dummy                         & \multicolumn{2}{c}{Yes} \\
R$^2$                              &   -1.156        &  -2.452 \\
Adjusted R$^2$                     &   0.652         & 1.562 \\
Sargan test                        & 12.02\tc{***}   & 41.02\tc{***} \\
\bottomrule
\end{tabular}
\smallskip

\begin{minipage}{\textwidth}
\small
\textit{Note:} This table reports SGMM estimation results of \cref{eq:1} where non-performing loans to total loans ($\NPL$), and Z-score ($\LnZ$) are the endogenous variables for bank $i$ and year $t$. The $\NPL_{i,t-1}$ and $\LnZ_{it-1}$ are lagged dependent variables. $\OP$ and $\OF$ is the independent PRIVATE (DUMMY), FOREIGN (DUMMY), passive shareholding ($\PF$), minority active shareholding ($\EF$) and active shareholding ($\LTS$) are the main explanatory ownership variables. Bank size ($\LTS$), corporate governance ($\EA$), financial leverage ($\LT$) are bank level control variables; and growth of product ($\LGI$), rate of inflation ($\AGI$) are two macro-economic control variables. T-statistics are between parentheses; \enspace *** $p < 0.01$; \enspace ** $p < 0.05$;\enspace * $p < 0.10$. The Sargan test justifies the validity of the over identifying restrictions.
 \end{minipage}
\end{table}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .