TeX - LaTeX Asked by haithem on March 19, 2021
Hi i have a problem with fitting the table using the Elsevier elsarticle documentclass, here my code and my output
documentclass[preprint,12pt,authoryear]{elsarticle}
usepackage{booktabs, tabularx}
usepackage{booktabs, tabularx}
usepackage{xparse}
usepackage{siunitx}
usepackage{natbib}
usepackage{amsmath}
usepackage{amsthm}
usepackage[protrusion=true,expansion=true]{microtype}
usepackage{placeins}
usepackage{float}
usepackage{cuted}
usepackage[english]{babel}
usepackage[latin1]{inputenc}
usepackage{booktabs, makecell, multirow, threeparttable}
usepackage{xparse}
usepackage{xstring}
usepackage{dcolumn}
usepackage{relsize}
usepackage{varioref}
usepackage{hyperref}
hypersetup{colorlinks = true, allcolors = blue}
usepackage[nameinlink,noabbrev]{cleveref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%asterisk in Table%%%%
usepackage{xcolor}
newcommandtc[1]{textcolor{blue}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
newcommand{Risk}{mathop{textnormal{slshape Risk}}nolimits}
newcommand{CEOPC}{mathop{textnormal{slshape CEO_PC}}nolimits}
newcommand{Boardind}{mathop{textnormal{slshape Board_ind}}nolimits}
newcommand{OwnP}{mathop{textnormal{slshape OwnP}}nolimits}
newcommand{OwnF}{mathop{textnormal{slshape OwnF}}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 Ln_ZScore}}nolimits}
newcommand{CCB}{mathop{textnormal{slshape CCB}}nolimits}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
newcommand{LnTA}{mathop{textnormal{slshape LnTA}}nolimits}
newcommand{ECTA}{mathop{textnormal{slshape ECTA}}nolimits}
newcommand{LTQ}{mathop{textnormal{slshape LTQ}}nolimits}
newcommand{PRF}{mathop{textnormal{slshape PRF}}nolimits}
newcommand{EFF}{mathop{textnormal{slshape EFF}}nolimits}
newcommand{LEV}{mathop{textnormal{slshape LEV}}nolimits}
newcommand{LG}{mathop{textnormal{slshape LG}}nolimits}
newcommand{AG}{mathop{textnormal{slshape AG}}nolimits}
newcommand{DIV}{mathop{textnormal{slshape DIV}}nolimits}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
setlength{parindent}{0pt}
NewExpandableDocumentCommandmcc{O{1}m}
{multicolumn{#1}{c}{#2}}
NewExpandableDocumentCommandmcl{O{9}m}
{multicolumn{#1}{@{}l}{#2}}
crefname{equation}{eq.}{eq.} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
begin{table}[ht]
sisetup{table-format=-2.5,
table-number-alignment=center,
table-space-text-pre =(,
table-space-text-post=$^{***}$,
table-align-text-pre=false,
table-align-text-post=false}
centering
caption{Effect of Politically connected CEO's on banks' risk-taking Behavior}
label{tab2}
begin{tabular}{l*{2}{S}}
toprule
thead{Variable} & {thead{$NPLs$}} & {thead{$ZScore$}}
midrule
multirow{2}[1]{*}{Constant} & -0.1064tc{***} & 5.0727tc{***}
multicolumn{1}{c}{} & {(}-3.420{)} & {(}15.355{)}
addlinespace
multirow{2}[0]{*}{$NPL_{it-1}$} & 0.6014tc{***} &
multicolumn{1}{c}{} & {(}5.730{)} &
addlinespace
multirow{2}[1]{*}{$LnZ_{it-1}$} & & 0.5110tc{***}
multicolumn{1}{c}{} & & {(}5.830{)}
addlinespace
multirow{2}[1]{*}{$CEOPC_{it}$} & 6.2810tc{***} & 0.1151
multicolumn{1}{c}{} & {(}12.450{)} & {(}1.478{)}
addlinespace
multirow{2}[1]{*}{$Boardind$} & -0.2450tc{**} & -0.2401tc{***}
multicolumn{1}{c}{} & {(}-2.260{)} & {(}-9.414{)}
addlinespace
multirow{2}[1]{*}{$OwnF$} & -0.0103tc{***} & 0.0345tc{**}
multicolumn{1}{c}{} & {(}-2.605{)} & {(}2.520{)}
addlinespace
multirow{2}[1]{*}{$OwnP$} & -0.0101tc{*} & 0.0301tc{*}
multicolumn{1}{c}{} & {(}-1.910{)} & {(}1.902{)}
addlinespace
multirow{2}[1]{*}{$LnTA$} & 0.0171tc{**} &-0.2791tc{***}
multicolumn{1}{c}{} & {(}2.120{)} & {(}-3.830{)}
addlinespace
multirow{2}[1]{*}{$LTQ$} & -0.1854tc{*} & -0.4525
multicolumn{1}{c}{} & {(}-0.450{)} & {(}-0.390{)}
addlinespace
multirow{2}[1]{*}{$PRF$} & -0.5240tc{*} & -0.0520
multicolumn{1}{c}{} & {(}-3.065{)} & {(}-1.243{)}
addlinespace
multirow{2}[1]{*}{$EFF$} & 0.0262tc{**} & -0.0861tc{***}
multicolumn{1}{c}{} & {(}1.733{)} & {(}-3.350{)}
addlinespace
multirow{2}[1]{*}{$LEV$} & -0.5640tc{***} &
multicolumn{1}{c}{} & {(}-1.430{)} &
addlinespace
multirow{2}[1]{*}{$LG$} & -0.0270 &
multicolumn{1}{c}{} & {(}-4.930{)} &
addlinespace
multirow{2}[1]{*}{$AG$} & & 0.0612tc{***}
multicolumn{1}{c}{} & & {(}0.905{)}
addlinespace
multirow{2}[1]{*}{$DIV$} & & 0.3120tc{**}
multicolumn{1}{c}{} & & {(}2.120{)}
midrule
Year dummy & multicolumn{2}{c}{Yes}
Arellano-Bond test for AR(1) & 1.156 & 2.452
Arellano-Bond test for AR(2) & 0.652 & 1.562
P-value & 00.00 & 00.00
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 dependent variables for bank $i$ and
year $t$. The $NPL_{i,t-1}$ and $LnZ_{it-1}$ are lagged dependent variables. $CEOPC_{it}$
takes a value of one if the bank has explicit political connection,and zero otherwise. $OwnP$ and $OwnF$ denotes the Private and Foreign Ownership type . For bank level control variables, The main explanatory variables are defined as follows : Bank size ($LnTA$), Liquidity ($LTQ$), Profitability ($PRF$), Efficiency($EFF$), Leverage ($LEV$), Loan growth ($LG$), Asset growth ($AG$) and Diversification ($DIV$). Detailed definitions for each variable can be found in Section~ref{sec:Data_variables}. T-statistics are between parentheses.The Sargan test justifies the validity of the over identifying restrictions. Statistical significance indicates enspace *** $p < 0.01$; enspace ** $p < 0.05$;enspace * $p < 0.10$.
end{minipage}
end{table}
end{document}
Output Table 1:
Code For Table with multiple columns
documentclass[preprint,12pt,authoryear]{elsarticle}
usepackage{booktabs, tabularx}
usepackage{xparse}
usepackage{siunitx}
usepackage{natbib}
usepackage{amsmath}
usepackage{amsthm}
usepackage[protrusion=true,expansion=true]{microtype}
usepackage{placeins}
usepackage{float}
usepackage{cuted}
usepackage[english]{babel}
usepackage[latin1]{inputenc}
usepackage{makecell, multirow, threeparttable}
usepackage{longtable} %<--- added
usepackage{xparse}
usepackage{xstring}
usepackage{dcolumn}
usepackage{relsize}
usepackage{varioref}
usepackage{hyperref}
hypersetup{colorlinks = true, allcolors = blue}
usepackage[nameinlink,noabbrev]{cleveref}
%%%%%%%%%%%%%%%%%%
usepackage{xcolor}
newcommandtc[1]{textcolor{blue}{#1}}
%%%%%%%%%%%%%%
newcommand{LnTA}{mathop{textnormal{slshape LnTA}}nolimits}
newcommand{ECTA}{mathop{textnormal{slshape ECTA}}nolimits}
newcommand{LTQ}{mathop{textnormal{slshape LTQ}}nolimits}
newcommand{PRF}{mathop{textnormal{slshape PRF}}nolimits}
newcommand{EFF}{mathop{textnormal{slshape EFF}}nolimits}
newcommand{LEV}{mathop{textnormal{slshape LEV}}nolimits}
newcommand{LG}{mathop{textnormal{slshape LG}}nolimits}
newcommand{AG}{mathop{textnormal{slshape AG}}nolimits}
newcommand{DIV}{mathop{textnormal{slshape DIV}}nolimits}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeclareRobustCommand{variablename}[1]{mathop{textnormal{slshape #1}}nolimits}
newcommand{CEOPCGOVOFF}{variablename{CEO}_{variablename{PC}_{variablename{GOVOFF}}}}
newcommand{CEOPCPPM}{variablename{CEO}_{variablename{PC}_{variablename{PPM}}}}
newcommand{CEOPCPPM}{variablename{CEO}_{variablename{PC}_{variablename{PPM}}}}
newcommand{Controls}{mathop{textnormal{slshape Controls}}nolimits}
setlength{parindent}{0pt}
NewExpandableDocumentCommandmcc{O{1}m}
{multicolumn{#1}{c}{#2}}
NewExpandableDocumentCommandmcl{O{9}m}
{multicolumn{#1}{@{}l}{#2}}
crefname{equation}{eq.}{eq.}
%usepackage{lipsum}
begin{document}
begin{table}[h]
sisetup{input-open-uncertainty = ,
input-close-uncertainty = ,
table-space-text-pre = (,
table-space-text-post = ***,
table-format = 3.3,
table-align-text-pre = false,
table-align-text-post = false}
centering
caption{Effect of CEO's political identity on banks' risk-taking
Behavior including interactions with Ownership concentration }
begin{tabular}{@{} l *{4}{S} @{}}
toprule
& multicolumn{2}{c}{textit{Credit risk}}
& multicolumn{2}{c@{}}{textit{Insolvency risk}}
& multicolumn{2}{c}{textit{NPLs}}
& multicolumn{2}{c@{}}{textit{ZScore}}
cmidrule(lr){2-3} cmidrule(l){4-5}
& {Model} & {Model} & {Model} & {Model}
& {(1)} & {(2)} & {(1)} & {(2)}
midrule
Constant
& -0.1183tc{***} & -0.1369tc{***} & 0.1087tc{***} & 0.1011tc{***}
& (-3.180) & (-3.040) & (10.350) & (9.420)
addlinespace
$NPL$_{it-1}$$
& 0.2335tc{***} & 0.3625tc{***} & &
& (2.390) & (2.422) & &
addlinespace
$LnZ$_{it-1}$$
& & & 0.5635tc{***} & 0.5725tc{***}
& & & (6.020) & (5.245)
addlinespace
MAS
& -0.0462tc{***}& & -0.0852tc{***} &
& (-0.328) & & (-0.545) &
addlinespace
ACS
& & 0.0649 & & 0.0532
& & (0.890) & & (0.802)
addlinespace
CEOPCGOVOFF$_{it}$
& 0.2856tc{*} & 0.2630 & 0.2846tc{*} & 0.4125tc{**}
& (1.702) & (1.546) & (1.680) & (2.120)
addlinespace
CEOPCGOVOFF$_{it}$${}times{}$MAS$_{i,t}$
& 0.0630tc{***} & & 0.0746tc{***} &
& (0.010) & & (0.020) &
addlinespace
CEOPCGOVOFF$_{it}$${}times{}$ACS$_{i,t}$
& & 0.0726tc{***} & & 0.0834tc{***}
& & (0.010) & & (0.022)
addlinespace
CEOPCPPM
& 0.3288tc{***} & 0.3241tc{***} & 0.0692tc{***} &
0.0691tc{**}
& (0.042) & (0.040) & (0.011) & (0.010)
addlinespace
CEOPCPPM$_{it}$${}times{}$MAS$_{i,t}$
& 0.1576tc{***} & & 0.1640tc{***} &
& (0.020) & & (0.032) &
addlinespace
CEOPCPPM$_{it}$${}times{}$ACS$_{i,t}$
& & 0.3116tc{***} & & 0.1728tc{***}
& & (0.044)& & (0.039)
addlinespace
LnTA
& -0.0370tc{**} & -0.0346tc{***} & 0.0668tc{***} &
0.0716tc{***}
& (0.016) & (0.014) & (0.020) & (0.022)
addlinespace
LTQ
& -0.2904tc{***} & -0.2840tc{***} & 1.5091tc{***} & 1.4960tc{***}
& (0.076) & (0.056) & (0.354) & (0.338)
addlinespace
PRF
& -0.1825tc{***} & -0.1827tc{***} & -0.1802tc{***} &
-0.1804tc{***}
& (0.021) & (0.020) & (0.020) & (0.20)
addlinespace
EFF
& 1.0853tc{***} & 1.0954tc{***} & -0.1339 & -0.1362
& (0.256) & (0.258) & (0.104) & (0.106)
addlinespace
LEV
& -0.0810tc{**} & -0.0430 & &
& (0.037) & (0.027) & &
addlinespace
LG
& 0.1141tc{***} & 0.1128tc{***} & &
& (0.026) & (0.024) & &
addlinespace
AG
& & & 0.0289tc{*} & 0.0290tc{*}
& & & (0.014) & (0.014)
addlinespace
DIV
& & & 0.0598tc{*} & 0.0621tc{*}
& & & (0.028) & (0.032)
midrule
Year dummy & {Yes} & {Yes} & {Yes} & {Yes}
Arellano-Bond test for AR(1) & 0.546 & 0.314 & 0.178 & 0.112
Arellano-Bond test for AR(2) & 0.143 & 0.139 & 0.143 & 0.140
Sargan test & 146.365 & 101.519 & 65.110 & 43.686
bottomrule
addlinespace
multicolumn{5}{@{}l}{This table reports SGMM estimation results of
$Cref{eq:5}$.}
multicolumn{5}{@{}l}{* $p<0.1$; ** $p<0.05$; *** $p<0.01$}
end{tabular}
label{tab5}
end{table}
end{document}
Here is how you can use the longtable
package in order to split your table across two consecutive pages:
documentclass[preprint,12pt,authoryear]{elsarticle}
usepackage{booktabs, tabularx}
% usepackage{booktabs, tabularx} % Do not load packages more than once.
usepackage{xparse}
usepackage{siunitx}
usepackage{natbib}
usepackage{amsmath}
usepackage{amsthm}
usepackage[protrusion=true,expansion=true]{microtype}
usepackage{placeins}
usepackage{float}
usepackage{cuted}
usepackage[english]{babel}
usepackage[latin1]{inputenc}
usepackage{makecell, multirow, threeparttable}
usepackage{xcolor}
usepackage{longtable} %<--- added
usepackage{xparse}
usepackage{xstring}
usepackage{dcolumn}
usepackage{relsize}
usepackage{varioref}
usepackage{hyperref}
hypersetup{colorlinks = true, allcolors = blue}
usepackage[nameinlink,noabbrev]{cleveref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%asterisk in Table%%%%
newcommandtc[1]{textcolor{blue}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
newcommand{Risk}{mathop{textnormal{slshape Risk}}nolimits}
newcommand{CEOPC}{mathop{textnormal{slshape CEO_PC}}nolimits}
newcommand{Boardind}{mathop{textnormal{slshape Board_ind}}nolimits}
newcommand{OwnP}{mathop{textnormal{slshape OwnP}}nolimits}
newcommand{OwnF}{mathop{textnormal{slshape OwnF}}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 Ln_ZScore}}nolimits}
newcommand{CCB}{mathop{textnormal{slshape CCB}}nolimits}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
newcommand{LnTA}{mathop{textnormal{slshape LnTA}}nolimits}
newcommand{ECTA}{mathop{textnormal{slshape ECTA}}nolimits}
newcommand{LTQ}{mathop{textnormal{slshape LTQ}}nolimits}
newcommand{PRF}{mathop{textnormal{slshape PRF}}nolimits}
newcommand{EFF}{mathop{textnormal{slshape EFF}}nolimits}
newcommand{LEV}{mathop{textnormal{slshape LEV}}nolimits}
newcommand{LG}{mathop{textnormal{slshape LG}}nolimits}
newcommand{AG}{mathop{textnormal{slshape AG}}nolimits}
newcommand{DIV}{mathop{textnormal{slshape DIV}}nolimits}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
setlength{parindent}{0pt}
NewExpandableDocumentCommandmcc{O{1}m}
{multicolumn{#1}{c}{#2}}
NewExpandableDocumentCommandmcl{O{9}m}
{multicolumn{#1}{@{}l}{#2}}
crefname{equation}{eq.}{eq.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usepackage{lipsum}
begin{document}
{
sisetup{table-format=-2.5,
table-number-alignment=center,
table-space-text-pre =(,
table-space-text-post=tc{***},
table-align-text-pre=false,
table-align-text-post=false}
begin{longtable}{l*{2}{S}}
caption{Effect of Politically connected CEO's on banks' risk-taking Behavior}
label{tab2}
toprule
thead{Variable} & {thead{$NPLs$}} & {thead{$ZScore$}}
midrule
endfirsthead
caption{Effect of Politically connected CEO's on banks' risk-taking Behavior - continued from previous page}
toprule
thead{Variable} & {thead{$NPLs$}} & {thead{$ZScore$}}
midrule
endhead
bottomrule
endfoot
multirow{2}[1]{*}{Constant} & -0.1064tc{***} & 5.0727tc{***} *
& {(}-3.420{)} & {(}15.355{)} addlinespace
multirow{2}[0]{*}{$NPL_{it-1}$} & 0.6014tc{***} & *
& {(}5.730{)} & addlinespace
multirow{2}[1]{*}{$LnZ_{it-1}$} & & 0.5110tc{***} *
& & {(}5.830{)} addlinespace
multirow{2}[1]{*}{$CEOPC_{it}$} & 6.2810tc{***} & 0.1151 *
& {(}12.450{)} & {(}1.478{)} addlinespace
multirow{2}[1]{*}{$Boardind$} & -0.2450tc{**} & -0.2401tc{***} *
& {(}-2.260{)} & {(}-9.414{)} addlinespace
multirow{2}[1]{*}{$OwnF$} & -0.0103tc{***} & 0.0345tc{**} *
& {(}-2.605{)} & {(}2.520{)} addlinespace
multirow{2}[1]{*}{$OwnP$} & -0.0101tc{*} & 0.0301tc{*} *
& {(}-1.910{)} & {(}1.902{)} addlinespace
multirow{2}[1]{*}{$LnTA$} & 0.0171tc{**} &-0.2791tc{***} *
& {(}2.120{)} & {(}-3.830{)} addlinespace
multirow{2}[1]{*}{$LTQ$} & -0.1854tc{*} & -0.4525 *
& {(}-0.450{)} & {(}-0.390{)} addlinespace
multirow{2}[1]{*}{$PRF$} & -0.5240tc{*} & -0.0520 *
& {(}-3.065{)} & {(}-1.243{)} addlinespace
multirow{2}[1]{*}{$EFF$} & 0.0262tc{**} & -0.0861tc{***} *
& {(}1.733{)} & {(}-3.350{)} addlinespace
multirow{2}[1]{*}{$LEV$} & -0.5640tc{***} & *
& {(}-1.430{)} & addlinespace
multirow{2}[1]{*}{$LG$} & -0.0270 & *
& {(}-4.930{)} & addlinespace
multirow{2}[1]{*}{$AG$} & & 0.0612tc{***} *
& & {(}0.905{)} addlinespace
multirow{2}[1]{*}{$DIV$} & & 0.3120tc{**} *
& & {(}2.120{)}
midrule
Year dummy & multicolumn{2}{c}{Yes}
Arellano-Bond test for AR(1) & 1.156 & 2.452
Arellano-Bond test for AR(2) & 0.652 & 1.562
P-value & 00.00 & 00.00
Sargan test & 12.02tc{***} & 41.02tc{***}
end{longtable}
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 dependent variables for bank $i$ and year $t$. The $NPL_{i,t-1}$ and $LnZ_{it-1}$ are lagged dependent variables. $CEOPC_{it}$ takes a value of one if the bank has explicit political connection,and zero otherwise. $OwnP$ and $OwnF$ denotes the Private and Foreign Ownership type . For bank level control variables, The main explanatory variables are defined as follows : Bank size ($LnTA$), Liquidity ($LTQ$), Profitability ($PRF$), Efficiency($EFF$), Leverage ($LEV$), Loan growth ($LG$), Asset growth ($AG$) and Diversification ($DIV$). Detailed definitions for each variable can be found in Section~ref{sec:Data_variables}. T-statistics are between parentheses.The Sargan test justifies the validity of the over identifying restrictions. Statistical significance indicates enspace *** $p < 0.01$; enspace ** $p < 0.05$;enspace * $p < 0.10$.
end{minipage}
}
end{document}
Correct answer by leandriis on March 19, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP