I want to put a table under a paragraph, and here are the codes:
\documentclass{article}
\usepackage{ragged2e}
\usepackage{tabularx, makecell}
\setlength{\extrarowheight}{2pt}
\setlength{\tabcolsep}{3pt}%
\begin{document}
\section{Modelling}
We propose a model based on the data described in Chapter 1, with an endpoint and a large number of SNPs. To predict the toxicity, a prediction rule is constructed. We use the maximum likelihood estimator (MLE) and then propose shrinkage estimators to improve the MLE. All shrinkage estimators are formulated in a Bayesian sense. Details on this will follow later.
Important notations used for mathematical convenience are listed in Table \ref{notaion}. Throughout the thesis, the notation $X_i$ represents the \ith SNP, and the notation $X_{ik}, k =1,\ldots,n$, represent the $i$th SNP of the $k$th patient. The endpoint is denoted as $Y$. For conditioning, we will use the symbol "$\mid$". And the probabilities are denoted as "P".
\begin{table}
\FloatBarrier
\begin{tabular}{l|L{11cm}}
Symbols & Description \\\hline
$N$ & The number of SNPs \\
$n$ & The number of patients \\
$X_i$ & $i$th SNP \\
$Y$ & The endpoint \\
$\beta_i$ & Effect size for $i$th SNP \\
$\mathrm{p}_{i+}$ & The probability of patients having a major allele for $i$th SNP given that patient experience toxicity \\
$\mathrm{p}_{i-}$ & The probability of patients having a minor allele for $i$th SNP given that patient do not experience toxicity \\
$n_{+}$ &The number of patients experience toxicity \\
$n_{-}$ &The number of patients do not experience toxicity \\
$Z_{i+}$ & The number of patient having a major allele for $i$th SNP given that patient experience toxicity \\
$Z_{i-}$ & The number of patient having a minor allele for $i$th SNP given that patient do not experience toxicity
\\\hline
\end{tabular}
\caption{List of notations }
\label{notaion}
\end{table}
\FloatBarrier
\end{document}
However, it displays as
How can I fix the table under the texts?
\newcommand
s as well some package ...L
column type is defined. By the way, judging purely by the screenshot you posted, thetabular
environment would appear to be much wider than the text block. Is this something you'd like to fix as well?X
column type and the[!htb]
optional argument for thetable
environment, you have what you want without any\FloatBarrier
.table
environment is to allow the table to move to help with page breaking, if the table is part of the text flow and should never move, just usetabular