TransWikia.com

Cite equation using tables notes

TeX - LaTeX Asked on November 6, 2021

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}{smallbfseries}
  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.1064tc{***} & 5.0727tc{***} \
  multicolumn{1}{c}{}         & {(}-3.42{)} & {(}5.35{)} \    
  addlinespace
   multirow{2}[0]{*}{$NPL$_{i,t-1}$$} & 0.021tc{***}   & \
   multicolumn{1}{c}{}              & {(}5.73{)}  & \
   addlinespace
   multirow{2}[1]{*}{$LnZ$_{it-1}$$} &     &  0.1452tc{***} \
   multicolumn{1}{c}{}               &     & {(}5.83{)} \
 addlinespace
   multirow{2}[1]{*}{$CEOPC$_{it}$$} & 6.4521tc{***}   & 0.0124 \
    multicolumn{1}{c}{}                 & {(}11.14{)} & {(}1.12{)} \  
 addlinespace
   multirow{2}[1]{*}{$Boardind$} & -0.1452tc{**}    & -0.1245tc{***}  \
   multicolumn{1}{c}{}             & {(}-2.11{)} & {(}-8.25{)} \              
addlinespace
multirow{2}[1]{*}{$OF$} & -0.0103tc{***}  & 0.0345tc{**} \
multicolumn{1}{c}{}         & {(}-2.45{)} & {(}2.33{)} \              
  addlinespace
  multirow{2}[1]{*}{$OP$} & -0.1445tc{*}    & 0.1478tc{*} \
  multicolumn{1}{c}{}         & {(}-1.91{)} & {(}1.90{)} \            
  addlinespace
   multirow{2}[1]{*}{$LTS$} & 0.1019tc{**}    &-0.2645tc{***} \
   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.1478tc{*} & -0.2010\
   multicolumn{1}{c}{} & {(}-0.45{)} & {(}-0.14{)} \
 addlinespace
  multirow{2}[1]{*}{$PF$} & -0.5240tc{*} & -0.0520 \
  multicolumn{1}{c}{} & {(}-3.06{)} & {(}-1.24{)} \                   
 addlinespace
  multirow{2}[1]{*}{$EF$} & 0.0120 & -1.2322tc{***} \
   multicolumn{1}{c}{} & {(}4.20{)} & {(}-2.20{)} \
addlinespace
  multirow{2}[1]{*}{$LV$} & -0.1478tc{***} &  \
  multicolumn{1}{c}{} & {(}-11.02{)} &  \ 
 addlinespace
   multirow{2}[1]{*}{$LGI$} & 0.1247 &  \
   multicolumn{1}{c}{} & {(}0.2010{)} &  \    
  addlinespace
  multirow{2}[1]{*}{$AGI$} &  & 0.0012tc{***} \
  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.02tc{***} &41.02tc{***} \
    addlinespace
bottomrule
end{tabular*}
begin{tablenotes}[para,flushleft]
footnotesizesmallskip
   itemhspace{-2.5pt}noindenttextit{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}

One Answer

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}{smallbfseries}
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}
newcommandtc[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.1064tc{***} & 5.0727tc{***} \
                                   & {(}-3.42{)}     & {(}5.35{)} \    
addlinespace
multirow{2}[0]{*}{$NPL_{i,t-1}$} & 0.021tc{***}   & \
                                   & {(}5.73{)}      & \
addlinespace
multirow{2}[1]{*}{$LnZ_{it-1}$}  &                 &  0.1452tc{***} \
                                   &                 & {(}5.83{)} \
addlinespace
multirow{2}[1]{*}{$CEOPC_{it}$}  & 6.4521tc{***}  & 0.0124 \
                                   & {(}11.14{)}     & {(}1.12{)} \  
addlinespace 
multirow{2}[1]{*}{$Boardind$}    & -0.1452tc{**}  & -0.1245tc{***}  \
                                   & {(}-2.11{)}     & {(}-8.25{)} \              
addlinespace
multirow{2}[1]{*}{$OF$}          & -0.0103tc{***} & 0.0345tc{**} \
                                   & {(}-2.45{)}     & {(}2.33{)} \              
addlinespace
multirow{2}[1]{*}{$OP$}          & -0.1445tc{*}   & 0.1478tc{*} \
                                   & {(}-1.91{)}     & {(}1.90{)} \            
addlinespace
multirow{2}[1]{*}{$LTS$}         & 0.1019tc{**}   &-0.2645tc{***} \
                                   & {(}2.45{)}      & {(}-3.47{)} \       
addlinespace
multirow{2}[1]{*}{$EA$}          & 0.2114          & 0.4789 \
                                   & {(}1.03{)}      & {(}0.10{)} \                
addlinespace
multirow{2}[1]{*}{$LT$}          & -0.1478tc{*}   & -0.2010\
                                   & {(}-0.45{)}     & {(}-0.14{)} \
addlinespace
multirow{2}[1]{*}{$PF$}          & -0.5240tc{*}   & -0.0520 \
                                   & {(}-3.06{)}     & {(}-1.24{)} \                   
addlinespace
multirow{2}[1]{*}{$EF$}          & 0.0120          & -1.2322tc{***} \
                                   & {(}4.20{)}      & {(}-2.20{)} \
addlinespace
multirow{2}[1]{*}{$LV$}          & -0.1478tc{***} &  \
                                   & {(}-11.02{)}    &  \ 
addlinespace
multirow{2}[1]{*}{$LGI$}         & 0.1247          &  \
                                   & {(}0.2010{)}    &  \    
addlinespace
multirow{2}[1]{*}{$AGI$}         &                 & 0.0012tc{***} \
                                   &                 & {(}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.02tc{***}   & 41.02tc{***} \
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}

Answered by leandriis on November 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP