how to center matrix in latex presentation - latex

\centering
\[
\begin{matrix}
\hline P& \beta^{1p} &\beta^{2p} & \beta^{3p} & \beta^{4p} &E(c^{p}) &\sigma(\delta c^{p}) &E(r^{p}-r^{f}) & \sigma( r^{p}-r^{f}) \\
\hline 1& 1.4360 & 0.0018& -0.0123 &-0.0195 &0.0292 & 0.0048 &0.0013 &0.0809 \\
5& 1.1428 & 0.0007 &-0.0098 &-0.0091 & 0.0113 &0.0018 &0.0041 &0.0618 \\
10& 1.0108 & 0.0005 & -0.0083 & -0.0073 & 0.0086 &0.0013 &0.0042 &0.0544 \\
15& 0.9065 &0.0004 &-0.0080 &-0.0061 & 0.0068 & 0.0010 &0.0050 &0.0493 \\
20&0.7602 &0.0003 &-0.0065 & -0.0045 & 0.0050 &0.0008 & 0.0060 & 0.0417\\
25& 0.7192 & 0.0000 &-0.0061 & -0.0010 & 0.0020 & 0.0003 & 0.0068 &0.0417
\end{matrix}
\]
This is my code and I want this matrix to be more in center.

Related

Latex Table goes out of margins

I have the following code which worked in my previous latex template, but now I have to submit to a journal and the tables goes out of the margin. I tried to use \resizebox{\textwidth}{!}{% ...} it does work. I have attached the code below for help.
\documentclass[10pt, twoside]{article}
\usepackage[b5j,hmargin={1 in,0.6 in},vmargin={1 in,0.6 in}]{geometry}
\usepackage{times}
\usepackage[labelsep=space, labelfont=bf]{caption}
\usepackage{amsmath,amssymb,amsthm,latexsym}
\begin{document}
\begin{table}[htbp]
\caption{Parameter estimates }
\label{tab:Application_MOTLOBXL1}
\begin{tabular}{lccccccccccccc}
\hline
Distribution & \multicolumn{4}{c}{Estimates} & -2Log(L) & AIC & AICC & BIC & $W^{*}$ & $A^{*}$ & K-S & P-value & SS \\ \hline
MOTLOBX-L & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 2.62$\times 10^{-3}$\\ (8.33$\times 10^{-4}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 1.21$\times 10^{1}$\\ (2.94$\times 10^{-4}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 1.06$\times 10^{3}$\\ (1.41$\times 10^{-9}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.13\\ (5.42$\times 10^{-2}$)\end{tabular} & 24.4 & 32.4 & 33.1 & 41.0 & 0.0639 & 0.3929 & 0.0891 & 0.6998 & 0.0581 \\ \hline
MOTLOBX-W & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 5.71$\times 10^{-3}$\\ (2.01$\times 10^{-3}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 8.45$\times 10^{1}$\\ (6.09$\times 10^{-6}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 8.12$\times 10^{2}$\\ (1.28$\times 10^{-8}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\lambda$\\ 3.61$\times 10^{-1}$\\ (2.07$\times 10^{-2}$)\end{tabular} & 25.1 & 33.1 & 33.8 & 41.7 & 0.1076 & 0.6042 & 0.0971 & 0.5928 & 0.0840 \\ \hline
WL & \begin{tabular}[c]{#{}c#{}}$a$\\ 3.29$\times 10^{-1}$\\ (6.38$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$b$\\ 3.97\\ (3.85$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 7.24$\times 10^{3}$\\ (6.30$\times 10^{-5}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.41$\times 10^{4}$\\ (3.25$\times 10^{-5}$)\end{tabular} & 29.1 & 37.1 & 37.8 & 45.6 & 0.1962 & 1.0892 & 0.1425 & 0.1544 & 0.1813\\ \hline
GBXII & \begin{tabular}[c]{#{}c#{}}$a$\\ 3.01$\times 10^{-2}$\\ (3.27$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$b$\\ 1.42\\ (5.97$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$c$\\ 1.57\\ (5.42$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 3.22\\ (1.87)\end{tabular} & 28.0 & 36.0 & 36.7 & 44.6 & 0.1616 & 0.9076 & 0.1318 & 0.2240 & 0.1504\\ \hline
MOOBII-Lo & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 4.51$\times 10^{2}$\\ (4.34$\times 10^{-6}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 1.96\\ (1.71$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 9.20$\times 10^{-2}$\\ (4.17$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\lambda$\\ 4.45\\ (7.51$\times 10^{-2}$)\end{tabular} & 40.4 & 48.4 & 49.1 & 57.0 & 0.3724 & 2.0787 & 0.1412 & 0.1619 & 0.2428\\ \hline
MOOBII-L & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 7.08$\times 10^{2}$\\ (1.74$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 1.07$\times 10^{2}$\\ (3.24$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.14$\times 10^{1}$\\ (1.14$\times 10^{1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\lambda$\\ 1.84$\times 10^{1}$\\ (1.89)\end{tabular} & 32.0 & 40.0 & 40.7 & 48.6 & 0.2639 & 1.4517 & 0.1257 & 0.2727 & 0.1704\\ \hline
TLOBX-L & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 3.17$\times 10^{-1}$\\ (1.56$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 1.99$\times 10^{1}$\\ (8.88)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 9.13$\times 10^{-1}$\\ (6.17$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 42.3 & 48.3 & 48.7 & 54.7 & 0.4676 & 2.5657 & 0.2280 & 0.0029 & 0.6164 \\ \hline
TL-L & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 4.22$\times 10^{-1}$\\ (2.96$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 9.53\\ (5.85)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 3.53\\ (3.85$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 62.6 & 68.6 & 69.0 & 75.0 & 0.6755 & 3.6946 & 0.3781 & $<0.0001$ & 2.4809 \\ \hline
MO-L & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 2.85$\times 10^{1}$\\ (1.27$\times 10^{1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 7.92\\ (8.73$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}-\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 45.6 & 49.6 & 49.8 & 53.9 & 0.4969 & 2.7489 & 0.1537 & 0.1019
& 0.3005 \\ \hline
OBX-L & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 5.83\\ (7.73$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.03\\ (6.09$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}-\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 45.6 & 51.7 & 51.9 & 56.0 & 0.5629 & 3.0915 & 0.2313 & 0.0024 & 0.6509 \\ \hline
\end{tabular}%
\end{table}
\end{document}
I am not sure if you have already submitted but I'd have a few improvements for you. Mostly, I changed to slightly better rules, formatted numbers and added extra vertical spaces for better presentation (also see the comments in the code)
\documentclass[10pt, twoside]{article}
\usepackage[b5j,hmargin={1 in,0.6 in},vmargin={1 in,0.6 in}]{geometry}
\usepackage{array}
\usepackage{times}
\usepackage{caption}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{rotating}
% sidwaystable environment does not rotate pages when viewing PDFs
% In twoside documents and no option is given to the package,
% sidewaystable rotates table such that bottom edge is facing outer margin.
% figuresright - bottom edge always turned to the right
% figureleft - bottom edge always turned to the left
\usepackage{booktabs} % improved rules
\usepackage{siunitx} % S type column to formnat numbers
\captionsetup[table]{
skip=3pt,
position=top,
labelsep=space,
labelfont=bf,
}
\sisetup{
round-mode=places,
round-precision=2,
table-format=1.2,
}
\newcommand\mlrule{\midrule[\cmidrulewidth]}
\begin{document}
\begin{sidewaystable}[htbp]
\renewcommand*{\arraystretch}{1.05}
\setlength\extrarowheight{-3pt}
\small
\centering
\caption{Parameter estimates}\label{tab:Application_MOTLOBXL1}
\begin{tabular}{l *8{c} *5{S}}
\toprule\rule[-4pt]{0pt}{13pt}
Distribution & \multicolumn{4}{c}{Estimates} & -2Log(L) & AIC & AICC & BIC & {$W^{*}$} & {$A^{*}$} & {K-S} & {P-value} & {SS} \\ \midrule
MOTLOBX-L
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
2.62$\times 10^{-3}$\\
(8.33$\times 10^{-4}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\theta$ \\
1.21$\times 10^{1}$ \\
(2.94$\times 10^{-4}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\delta$ \\
1.06$\times 10^{3}$ \\
(1.41$\times 10^{-9}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
1.13 \\
(5.42$\times 10^{-2}$)
\end{tabular} & 24.4 & 32.4 & 33.1 & 41.0 & 0.0639 & 0.3929 & 0.0891 & 0.6998 & 0.0581 \\ \mlrule
MOTLOBX-W
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
5.71$\times 10^{-3}$ \\
(2.01$\times 10^{-3}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\theta$ \\
8.45$\times 10^{1}$ \\
(6.09$\times 10^{-6}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\delta$ \\
8.12$\times 10^{2}$ \\
(1.28$\times 10^{-8}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\lambda$ \\
3.61$\times 10^{-1}$ \\
(2.07$\times 10^{-2}$)
\end{tabular} & 25.1 & 33.1 & 33.8 & 41.7 & 0.1076 & 0.6042 & 0.0971 & 0.5928 & 0.0840 \\ \mlrule
WL
& \begin{tabular}[c]{#{}c#{}}
$a$ \\
3.29$\times 10^{-1}$ \\
(6.38$\times 10^{-2}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$b$ \\
3.97 \\
(3.85$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
7.24$\times 10^{3}$ \\
(6.30$\times 10^{-5}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
1.41$\times 10^{4}$ \\
(3.25$\times 10^{-5}$)
\end{tabular} & 29.1 & 37.1 & 37.8 & 45.6 & 0.1962 & 1.0892 & 0.1425 & 0.1544 & 0.1813 \\ \mlrule
GBXII
& \begin{tabular}[c]{#{}c#{}}
$a$ \\
3.01$\times 10^{-2}$ \\
(3.27$\times 10^{-2}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$b$ \\
1.42 \\
(5.97$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$c$ \\
1.57 \\
(5.42$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\theta$ \\
3.22 \\
(1.87)
\end{tabular} & 28.0 & 36.0 & 36.7 & 44.6 & 0.1616 & 0.9076 & 0.1318 & 0.2240 & 0.1504 \\ \mlrule
MOOBII-Lo
& \begin{tabular}[c]{#{}c#{}}
$\delta$ \\
4.51$\times 10^{2}$ \\
(4.34$\times 10^{-6}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
1.96 \\
(1.71$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
9.20$\times 10^{-2}$ \\
(4.17$\times 10^{-2}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\lambda$ \\
4.45 \\
(7.51$\times 10^{-2}$)
\end{tabular} & 40.4 & 48.4 & 49.1 & 57.0 & 0.3724 & 2.0787 & 0.1412 & 0.1619 & 0.2428 \\ \mlrule
MOOBII-L
& \begin{tabular}[c]{#{}c#{}}
$\delta$ \\
7.08$\times 10^{2}$ \\
(1.74$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
1.07$\times 10^{2}$ \\
(3.24$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
1.14$\times 10^{1}$ \\
(1.14$\times 10^{1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\lambda$ \\
1.84$\times 10^{1}$ \\
(1.89)
\end{tabular} & 32.0 & 40.0 & 40.7 & 48.6 & 0.2639 & 1.4517 & 0.1257 & 0.2727 & 0.1704 \\ \mlrule
TLOBX-L
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
3.17$\times 10^{-1}$ \\
(1.56$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\theta$ \\
1.99$\times 10^{1}$ \\
(8.88)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
9.13$\times 10^{-1}$ \\
(6.17$\times 10^{-2}$)
\end{tabular}
& -- & 42.3 & 48.3 & 48.7 & 54.7 & 0.4676 & 2.5657 & 0.2280 & 0.0029$^{**}$ & 0.6164 \\ \mlrule
TL-L
& \begin{tabular}[c]{#{}c#{}}
$\alpha$ \\
4.22$\times 10^{-1}$ \\
(2.96$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\theta$ \\
9.53 \\
(5.85)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
3.53 \\
(3.85$\times 10^{-1}$)
\end{tabular}
& -- & 62.6 & 68.6 & 69.0 & 75.0 & 0.6755 & 3.6946 & 0.3781 & 0.0001$^{*}$ & 2.4809 \\ \mlrule
MO-L
& \begin{tabular}[c]{#{}c#{}}
$\delta$ \\
2.85$\times 10^{1}$ \\
(1.27$\times 10^{1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
7.92 \\
(8.73$\times 10^{-1}$)
\end{tabular}
& -- & -- & 45.6 & 49.6 & 49.8 & 53.9 & 0.4969 & 2.7489 & 0.1537 & 0.1019
& 0.3005 \\
\mlrule
OBX-L
& \begin{tabular}[c]{#{}c#{}}
$\theta$ \\
5.83 \\
(7.73$\times 10^{-1}$)
\end{tabular}
& \begin{tabular}[c]{#{}c#{}}
$\beta$ \\
1.03 \\
(6.09$\times 10^{-2}$)
\end{tabular}
& -- & -- & 45.6 & 51.7 & 51.9 & 56.0 & 0.5629 & 3.0915 & 0.2313 & 0.0024$^{**}$ & 0.6509 \\ \midrule[\heavyrulewidth]
\multicolumn{14}{#{}l}{$^{*}$p-value $<0.0001$, \qquad$^{**}$p-value $<0.005$}
\end{tabular}%
\end{sidewaystable}
\end{document}
You could use a (bit) smaller font and place this table on a landscape page:
\documentclass[10pt, twoside]{article}
\usepackage[b5j,hmargin={1 in,0.6 in},vmargin={1 in,0.6 in}]{geometry}
\usepackage{times}
\usepackage[labelsep=space, labelfont=bf]{caption}
\usepackage{amsmath,amssymb,amsthm,latexsym}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{table}[htbp]
\caption{Parameter estimates }
\label{tab:Application_MOTLOBXL1}
\footnotesize
\begin{tabular}{lccccccccccccc}
\hline
Distribution & \multicolumn{4}{c}{Estimates} & -2Log(L) & AIC & AICC & BIC & $W^{*}$ & $A^{*}$ & K-S & P-value & SS \\ \hline
MOTLOBX-L & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 2.62$\times 10^{-3}$\\ (8.33$\times 10^{-4}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 1.21$\times 10^{1}$\\ (2.94$\times 10^{-4}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 1.06$\times 10^{3}$\\ (1.41$\times 10^{-9}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.13\\ (5.42$\times 10^{-2}$)\end{tabular} & 24.4 & 32.4 & 33.1 & 41.0 & 0.0639 & 0.3929 & 0.0891 & 0.6998 & 0.0581 \\ \hline
MOTLOBX-W & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 5.71$\times 10^{-3}$\\ (2.01$\times 10^{-3}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 8.45$\times 10^{1}$\\ (6.09$\times 10^{-6}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 8.12$\times 10^{2}$\\ (1.28$\times 10^{-8}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\lambda$\\ 3.61$\times 10^{-1}$\\ (2.07$\times 10^{-2}$)\end{tabular} & 25.1 & 33.1 & 33.8 & 41.7 & 0.1076 & 0.6042 & 0.0971 & 0.5928 & 0.0840 \\ \hline
WL & \begin{tabular}[c]{#{}c#{}}$a$\\ 3.29$\times 10^{-1}$\\ (6.38$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$b$\\ 3.97\\ (3.85$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 7.24$\times 10^{3}$\\ (6.30$\times 10^{-5}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.41$\times 10^{4}$\\ (3.25$\times 10^{-5}$)\end{tabular} & 29.1 & 37.1 & 37.8 & 45.6 & 0.1962 & 1.0892 & 0.1425 & 0.1544 & 0.1813\\ \hline
GBXII & \begin{tabular}[c]{#{}c#{}}$a$\\ 3.01$\times 10^{-2}$\\ (3.27$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$b$\\ 1.42\\ (5.97$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$c$\\ 1.57\\ (5.42$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 3.22\\ (1.87)\end{tabular} & 28.0 & 36.0 & 36.7 & 44.6 & 0.1616 & 0.9076 & 0.1318 & 0.2240 & 0.1504\\ \hline
MOOBII-Lo & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 4.51$\times 10^{2}$\\ (4.34$\times 10^{-6}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 1.96\\ (1.71$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 9.20$\times 10^{-2}$\\ (4.17$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\lambda$\\ 4.45\\ (7.51$\times 10^{-2}$)\end{tabular} & 40.4 & 48.4 & 49.1 & 57.0 & 0.3724 & 2.0787 & 0.1412 & 0.1619 & 0.2428\\ \hline
MOOBII-L & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 7.08$\times 10^{2}$\\ (1.74$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 1.07$\times 10^{2}$\\ (3.24$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.14$\times 10^{1}$\\ (1.14$\times 10^{1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\lambda$\\ 1.84$\times 10^{1}$\\ (1.89)\end{tabular} & 32.0 & 40.0 & 40.7 & 48.6 & 0.2639 & 1.4517 & 0.1257 & 0.2727 & 0.1704\\ \hline
TLOBX-L & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 3.17$\times 10^{-1}$\\ (1.56$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 1.99$\times 10^{1}$\\ (8.88)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 9.13$\times 10^{-1}$\\ (6.17$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 42.3 & 48.3 & 48.7 & 54.7 & 0.4676 & 2.5657 & 0.2280 & 0.0029 & 0.6164 \\ \hline
TL-L & \begin{tabular}[c]{#{}c#{}}$\alpha$\\ 4.22$\times 10^{-1}$\\ (2.96$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 9.53\\ (5.85)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 3.53\\ (3.85$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 62.6 & 68.6 & 69.0 & 75.0 & 0.6755 & 3.6946 & 0.3781 & $<0.0001$ & 2.4809 \\ \hline
MO-L & \begin{tabular}[c]{#{}c#{}}$\delta$\\ 2.85$\times 10^{1}$\\ (1.27$\times 10^{1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 7.92\\ (8.73$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}-\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 45.6 & 49.6 & 49.8 & 53.9 & 0.4969 & 2.7489 & 0.1537 & 0.1019
& 0.3005 \\ \hline
OBX-L & \begin{tabular}[c]{#{}c#{}}$\theta$\\ 5.83\\ (7.73$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}$\beta$\\ 1.03\\ (6.09$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{#{}c#{}}-\end{tabular} & \begin{tabular}[c]{#{}c#{}} - \end{tabular} & 45.6 & 51.7 & 51.9 & 56.0 & 0.5629 & 3.0915 & 0.2313 & 0.0024 & 0.6509 \\ \hline
\end{tabular}%
\end{table}
\end{landscape}
\end{document}
I find it a bit difficult to make good looking tables in LaTeX, so I usually use this site: https://www.tablesgenerator.com/.
It lets you create your table and then it spits out the LaTeX code.
I hope you can use it.

How to add index outside a table in latex

How to add index outside a table like this?
Thanks!
Going out on a limb here, I assume you want to create the indeces in the smaller font size...
I extended the table and reduzed the font size for the indeces. Using the array package for the rest.
Minimal working the solution:
\documentclass{article}
\usepackage{array}
\begin{document}
\begin{table}
\centering
\begin{tabular}{ccccc}
& {\scriptsize 1} & {\scriptsize 2} & {\scriptsize 3} & {\scriptsize 4} \\ \cline{2-5}
{\scriptsize 1} & \multicolumn{1}{|c|}{0} &\multicolumn{1}{|c|}{ }& \multicolumn{1}{|c|}{-2}& \multicolumn{1}{|c|}{ } \\ \cline{2-5}
{\scriptsize 2} & \multicolumn{1}{|c|}{ } &\multicolumn{1}{|c|}{0}& \multicolumn{1}{|c|}{ } & \multicolumn{1}{|c|}{ } \\ \cline{2-5}
{\scriptsize 3} & \multicolumn{1}{|c|}{ } &\multicolumn{1}{|c|}{ }& \multicolumn{1}{|c|}{0} & \multicolumn{1}{|c|}{ } \\ \cline{2-5}
{\scriptsize 4} & \multicolumn{1}{|c|}{ } &\multicolumn{1}{|c|}{ }& \multicolumn{1}{|c|}{ } & \multicolumn{1}{|c|}{0} \\ \cline{2-5}
\end{tabular}
\end{table}
\end{document}
With the following result:
You can choose a different font size for the indices, like \small, \footnotesize or \tiny.
A basic version trying to reduce the number of multicolumns used may be:
\documentclass{article}
\begin{document}
\begin{tabular}{*{5}{c|}}
\multicolumn{1}{c}{ } & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{4}\\\cline{2-5}
1 & 0 & & -2 & \\\cline{2-5}
2 & & 0 & & \\\cline{2-5}
3 & & & 0 & \\\cline{2-5}
4 & & & & 0 \\\cline{2-5}
\end{tabular}
\end{document}

Latex - Uncomplete vertical line on tabular

I'm trying to make a bit tricky table in Latex using tabular, I wrote the following code :
\begin{tabular}{|c|c|c|c|c|}
\hline
n° structure & n° hexagone & valeur circuit & $R(K_i)$ & $E(B)$\\
\hline
\multirow{3}{*}{$K_1$} & $h_1$ & $R_1$ & \multirow{3}{*}{$2R_1 + R_2 = 1.984$} & \multirow{12}{*}{$\frac{6R_1 + 4R_2 + 2R_3}{4} = 1.5995$}\\
& $h_2$ & $R_1$ & \\
& $h_3$ & $R_2$ & \\
\cline{1-4}
\multirow{3}{*}{$K_2$} & $h_1$ & $R_1$ & \multirow{3}{*}{$R_1 + R_2 + R_3 = 1.215$} \\
& $h_2$ & $R_2$ & \\
& $h_3$ & $R_3$ & \\
\cline{1-4}
\multirow{3}{*}{$K_3$} & $h_1$ & $R_2$ & \multirow{3}{*}{$2R_1 + R_2 = 1.984$} \\
& $h_2$ & $R_1$ & \\
& $h_3$ & $R_1$ & \\
\cline{1-4}
\multirow{3}{*}{$K_4$} & $h_1$ & $R_3$ & \multirow{3}{*}{$R_1 + R_2 + R_3 = 1.215$} \\
& $h_2$ & $R_2$ & \\
& $h_3$ & $R_1$ & \\
\hline
\end{tabular}
And I got the following output, I really don't understand why the last vertical line isn't complete :
Does someone known the origin of the problem ?
Cordialy.
Your table would look much more professional if you would not use vertical lines. See e.g. the documentation of the booktabs package for more information about creating good looking tables.
If you insist on vertical lines, you must make sure that each row has the same number of cells:
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|c|c|c|c|c|}
\hline
n° structure & n° hexagone & valeur circuit & $R(K_i)$ & $E(B)$\\
\hline
\multirow{3}{*}{$K_1$} & $h_1$ & $R_1$ & \multirow{3}{*}{$2R_1 + R_2 = 1.984$} & \multirow{12}{*}{$\frac{6R_1 + 4R_2 + 2R_3}{4} = 1.5995$}\\
& $h_2$ & $R_1$ & & \\
& $h_3$ & $R_2$ & & \\
\cline{1-4}
\multirow{3}{*}{$K_2$} & $h_1$ & $R_1$ & \multirow{3}{*}{$R_1 + R_2 + R_3 = 1.215$} &\\
& $h_2$ & $R_2$ & & \\
& $h_3$ & $R_3$ & & \\
\cline{1-4}
\multirow{3}{*}{$K_3$} & $h_1$ & $R_2$ & \multirow{3}{*}{$2R_1 + R_2 = 1.984$} &\\
& $h_2$ & $R_1$ & & \\
& $h_3$ & $R_1$ & & \\
\cline{1-4}
\multirow{3}{*}{$K_4$} & $h_1$ & $R_3$ & \multirow{3}{*}{$R_1 + R_2 + R_3 = 1.215$} &\\
& $h_2$ & $R_2$ & & \\
& $h_3$ & $R_1$ & & \\
\hline
\end{tabular}
\end{document}

Latex table too wide

The code below shows my table but its obviously too wide. I am not familiar with packages like tabularx or tabular* so I am really not sure how to adjust the table to make it properly fit on my page. I also wouldn't mind the table to be sideways or in landscape mode, but when I try that the table positioning is way off. Can someone please help me?
\begin{table}
\begin{threeparttable}
\centering
\caption[Descriptive Statistics ]{Descriptive Statistics s}
\sisetup{add-integer-zero=false}
\begin{tabular}{lcccccccccccccccccccc}
\toprule
& \multicolumn{6}{c}{$\boldsymbol{2004-2011}$} && \multicolumn{6}{c}{$\boldsymbol{2012-2020}$} && \multicolumn{6}{c}{\textbf{Full Sample}}\\
\cmidrule(r){2-7}\cmidrule(lr){9-14}\cmidrule(l){16-21}
\\
& \textbf{Mean} & \textbf{Std.Dev.} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} && \textbf{Mean} & \textbf{Std.Dev.} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs}&& \textbf{Mean} & \textbf{Std.Dev.} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} \\
\midrule
\textbf{FSTS} & 0.39& 0.24& 0.38& -0.37&1.0& 3,039&& 0.42&0.24&0.40&-0.06&1.0&4,566& &0.40 & 0.24& 0.39& -0.37& 1.0&7,605 \\\addlinespace
\textbf{FATA} &0.33 &0.25 &0.30 &-2.15 &0.99 & 3,039&& 0.35&0.26&0.31&-1.53&1.0&4,566 && 0.34&0.25 &0.31 &-2.15 & 1.0&7,605 \\\addlinespace
\textbf{OSTS} &0.33 &0.34 &0.20 &0.0 &1.0 &3,039& &0.45 &0.34 & 0.55& 0.0&1.0 & 4,566&& 0.40&0.34 &0.46 &0.0 & 1.0&7,605 \\\addlinespace
\textbf{PDIO} &3.63 &3.19 & 2.0&1.0 &10.0& 3,039&& 4.79& 3.38& 4.0& 1.0& 10& 4,566&& 4.32 & 3.35& 3.0& 1.0& 10.0& 7,605 \\\addlinespace
\textbf{DOI} & 0.51&0.21& 0.43& 0.0& 0.99& 3,039& &0.59& 0.21& 0.62& 0.26& 1.0& 4,566&& 0.56& 0.21& 0.57& 0.0& 1.0& 7,605 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item \footnotesize\textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.
\end{tablenotes}
\label{tab:scales}%
\end{threeparttable}
\end{table}
You can rotate the table by using sidewaystable environment with use package rotating. I have break the word Std.Dev. by my macro \spheadcenter
\newcommand{\spheadcenter}[2][0]{%
{{\begin{turn}{#1}\let\toprule\relax\begin{tabular}[t]{c} #2 \end{tabular}\end{turn}}}}
Adjusting the column space by \tabcolsep3pt. #{} is to remove the extra space left and right of the table. See my below coding
\begin{sidewaystable}[!p]
\begin{threeparttable}
\centering
\caption[Descriptive Statistics ]{Descriptive Statistics s}
\sisetup{add-integer-zero=false}
{\tabcolsep3pt\begin{tabular}{#{}lcccccccccccccccccccc#{}}
\toprule
& \multicolumn{6}{c}{$\boldsymbol{2004-2011}$} && \multicolumn{6}{c}{$\boldsymbol{2012-2020}$} && \multicolumn{6}{c}{\textbf{Full Sample}}\\
\cmidrule(r){2-7}\cmidrule(lr){9-14}\cmidrule(l){16-21}
\\
& \textbf{Mean} & \textbf{\spheadcenter{Std.\\Dev.}} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} && \textbf{Mean} & \textbf{\spheadcenter{Std.\\Dev.}} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs}&& \textbf{Mean} & \textbf{\spheadcenter{Std.\\Dev.}} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} \\
\midrule
\textbf{FSTS} & 0.39& 0.24& 0.38& -0.37&1.0& 3,039&& 0.42&0.24&0.40&-0.06&1.0&4,566& &0.40 & 0.24& 0.39& -0.37& 1.0&7,605 \\\addlinespace
\textbf{FATA} &0.33 &0.25 &0.30 &-2.15 &0.99 & 3,039&& 0.35&0.26&0.31&-1.53&1.0&4,566 && 0.34&0.25 &0.31 &-2.15 & 1.0&7,605 \\\addlinespace
\textbf{OSTS} &0.33 &0.34 &0.20 &0.0 &1.0 &3,039& &0.45 &0.34 & 0.55& 0.0&1.0 & 4,566&& 0.40&0.34 &0.46 &0.0 & 1.0&7,605 \\\addlinespace
\textbf{PDIO} &3.63 &3.19 & 2.0&1.0 &10.0& 3,039&& 4.79& 3.38& 4.0& 1.0& 10& 4,566&& 4.32 & 3.35& 3.0& 1.0& 10.0& 7,605 \\\addlinespace
\textbf{DOI} & 0.51&0.21& 0.43& 0.0& 0.99& 3,039& &0.59& 0.21& 0.62& 0.26& 1.0& 4,566&& 0.56& 0.21& 0.57& 0.0& 1.0& 7,605 \\
\bottomrule
\end{tabular}}
\begin{tablenotes}
\item \footnotesize\textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.
\end{tablenotes}
\label{tab:scales}%
\end{threeparttable}
\end{sidewaystable}

How to improve latex table

In this table, how can I have the upper line that matches between the two tables? I would like to have two tables with the same height. Here is the code that I used to create the table
\documentclass{article}
\usepackage{geometry}
\usepackage{textcomp}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{booktabs} %
\usepackage[group-separator={,}]{siunitx}
\usepackage{changepage}
\newcommand{\undepth}[1]{%
\smash[b]{%
\begin{varwidth}[t]{\linewidth}#1\end{varwidth}
}%
}
\usepackage{makecell}%To keep spacing of text in tables
\begin{document}
\begin{table}[htbp!]
\centering
\footnotesize
\caption{caption}
\begin{tabular}{lSSSS}
\toprule
\makecell[cc]{column1 \\ second line} & \multicolumn{1}{l}{column2} & \multicolumn{1}{l}{column3} & \multicolumn{1}{l}{column4} & \multicolumn{1}{l}{column5} \\
\midrule
A & 4 & 0 & 0.00 & 4 \\
B & 30 & 0 & 0.00 & 30 \\
\bottomrule
\end{tabular}
\quad
\footnotesize
\begin{tabular}{lSS}
\toprule
& {Column1.1 } & {Column2.1}\\
\midrule
A & 0.02 & 0.00 \\
B & 0.04 & 0.00 \\
\bottomrule
\end{tabular}%
\end{table}%
\end{document}
Quick hack:
Put some invisible dummy header of the same height as in the other table
\documentclass{article}
\usepackage{geometry}
\usepackage{textcomp}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{booktabs} %
\usepackage[group-separator={,}]{siunitx}
\usepackage{changepage}
\newcommand{\undepth}[1]{%
\smash[b]{%
\begin{varwidth}[t]{\linewidth}#1\end{varwidth}
}%
}
\usepackage{makecell}%To keep spacing of text in tables
\begin{document}
\begin{table}[htbp!]
\centering
\footnotesize
\caption{caption}
\begin{tabular}{lSSSS}
\toprule
\makecell[cc]{column1 \\ second line} & \multicolumn{1}{l}{column2} & \multicolumn{1}{l}{column3} & \multicolumn{1}{l}{column4} & \multicolumn{1}{l}{column5} \\
\midrule
A & 4 & 0 & 0.00 & 4 \\
B & 30 & 0 & 0.00 & 30 \\
\bottomrule
\end{tabular}
\quad
\footnotesize
\begin{tabular}{lSS}
\toprule
\makecell[cc]{\mbox{} \\ \mbox{}} & {Column1.1 } & {Column2.1}\\
\midrule
A & 0.02 & 0.00 \\
B & 0.04 & 0.00 \\
\bottomrule
\end{tabular}%
\end{table}%
\end{document}
Cleaner solution:
Use only one tabular
\documentclass{article}
\usepackage{geometry}
\usepackage{textcomp}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{booktabs} %
\usepackage[group-separator={,}]{siunitx}
\usepackage{changepage}
\newcommand{\undepth}[1]{%
\smash[b]{%
\begin{varwidth}[t]{\linewidth}#1\end{varwidth}
}%
}
\usepackage{makecell}%To keep spacing of text in tables
\begin{document}
\begin{table}[htbp!]
\centering
\footnotesize
\caption{caption}
\begin{tabular}{lSSSSSS}
\cmidrule[\heavyrulewidth](r){1-5}\cmidrule[\heavyrulewidth](l){6-7}
\makecell[cc]{column1 \\ second line} & \multicolumn{1}{l}{column2} & \multicolumn{1}{l}{column3} & \multicolumn{1}{l}{column4} & \multicolumn{1}{l}{column5} & {Column1.1 } & {Column2.1} \\
\cmidrule(r){1-5}\cmidrule(l){6-7}
A & 4 & 0 & 0.00 & 4 & 0.02 & 0.00 \\
B & 30 & 0 & 0.00 & 30 & 0.04 & 0.00 \\
\cmidrule[\heavyrulewidth](r){1-5}\cmidrule[\heavyrulewidth](l){6-7}
\end{tabular}%
\end{table}%
\end{document}

Resources