The table is big in length and width, hence top and bottom of the table are chopped off from the table generated in a pdf file. Here goes the latex code.
\documentclass{article}
\usepackage[colorlinks]{hyperref}
\usepackage[noabbrev]{cleveref}
\usepackage{graphics}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{rotating}
\usepackage{latexsym}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage[tablename=TABLE,labelsep=newline,aboveskip=0pt,bf]{caption}
\usepackage{clipboard}
\usepackage{booktabs}
\usepackage[svgnames]{xcolor}
\usepackage[round]{natbib}
\usepackage[splitrule]{footmisc}
\usepackage{ltablex}
\usepackage{lipsum}
\usepackage{threeparttablex}
\usepackage{afterpage}
\usepackage{xr}
\usepackage{titlesec}
\usepackage{sectsty,textcase}
\usepackage{longtable}
\usepackage{sepfootnotes}
\usepackage{changepage}
\usepackage{siunitx}
%For making the titles in capital letters
%\allsectionsfont{\MakeTextUppercase}
\sisetup{
detect-mode,
% tight-spacing = true,
% group-digits = false,
input-signs = ,
input-symbols = ,
input-open-uncertainty = ,
input-close-uncertainty = ,
table-align-text-pre = false,
% table-align-text-post = false,
% round-mode = figures,
% round-precision = 3,
% table-space-text-pre = (,
% table-space-text-post = ),
}
\protected\def\stars#1{$^{#1}$}
\newcolumntype{k}{>{\hsize=.1\hsize}S}
%Set Counter
\setcounter{footnote}{2}
%Defining text size to control for spacing in tabularx environment
\newcolumntype{b}{>{\centering}>X}
%\newcolumntype{s}{>{\centering}>{\hsize=.25\hsize}>X}
\newcolumntype{j}{>{\centering}>{\hsize=.75\textwidth}>l}
%Redefining multicolumn environment to take care of @{}
\newcommand{\gmc}[2]{\multicolumn{#1}{@{}#2@{}}}
\begin{document}
\afterpage{
\begin{sidewaystable}
\begin{ThreePartTable}
\begin{TableNotes}[flushleft]
\small
\item \label{r2:a} \noindent This table presents the analyses of the nonlinear relationship between absolute discretionary accruals and observable characteristics. All models are estimated using multivariate linear regression, with dependent variable being absolute discretionary accrual and independent regressors being observable characteristics and their second order power transformations. *,**,*** indicate significance at the 0.10, 0.05, and 0.01 levels, respectively using two-tailed tests. All t-statistics (in parentheses) and p-values are calculated using heteroscedasticity-adjusted clustered (HAC) standard errors by company. Only the model in column (I) includes year and industry-specific intercepts, but for brevity those are not reported.
\end{TableNotes}
\begin{tabularx}{\textwidth}{@{}Xcccccccccccc@{}}
\caption{\textit{Nonlinear Relationship}}\label{tab:sample}\\\toprule\toprule
& \gmc{12}{l} \mbox{Dependent Variable = Absolute Discretionary Accrual}\\\cmidrule(l r){2-13}\\
Variables & (I) & (II) & (III) & (IV) & (V) & (VI) & (VII)& (VIII)& (IX)& (X)& (XI) & (XII) \\\midrule\endfirsthead
\caption{\textit{Nonlinear Relationship - Continued}}\\\toprule\toprule
& \gmc{12}{l} \mbox{Dependent Variable = Absolute Discretionary Accrual}\\\cmidrule(l r){2-13}\\
Variables & (I) & (II) & (III) & (IV) & (V) & (VI) & (VII)& (VIII)& (IX)& (X)& (XI) & (XII) \\\midrule\endhead
\bottomrule\gmc{2}{r}{\small\textit{(Continued)}}\endfoot
\bottomrule\insertTableNotes\endlastfoot
(Intercept) & $0.034^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ & $0.059^{***}$ \\
& $(8.256)$ & $(326.308)$ & $(302.004)$ & $(295.880)$ & $(285.826)$ & $(308.718)$ & $(307.844)$ & $(284.705)$ & $(285.351)$ & $(293.573)$ & $(291.619)$ & $(285.588)$ \\
poly(LOGASSETS, 2)1 & $-4.942^{***}$ & $-6.068^{***}$ & $-5.532^{***}$ & & & & & & & & & \\
& $(-20.000)$ & $(-25.236)$ & $(-94.950)$ & & & & & & & & & \\
poly(LOGASSETS, 2)2 & $-1.280^{***}$ & $-1.709^{***}$ & $0.948^{***}$ & & & & & & & & & \\
& $(-11.620)$ & $(-15.860)$ & $(15.861)$ & & & & & & & & & \\
poly(LOGMKT, 2)1 & $0.855^{***}$ & $1.401^{***}$ & & $-4.618^{***}$ & & & & & & & & \\
& $(3.435)$ & $(5.758)$ & & $(-80.615)$ & & & & & & & & \\
poly(LOGMKT, 2)2 & $0.747^{***}$ & $0.985^{***}$ & & $0.161^{***}$ & & & & & & & & \\
& $(7.709)$ & $(10.244)$ & & $(2.740)$ & & & & & & & & \\
poly(LEV, 2)1 & $0.486^{***}$ & $0.295^{***}$ & & & $0.123$ & & & & & & & \\
& $(4.894)$ & $(3.009)$ & & & $(1.588)$ & & & & & & & \\
poly(LEV, 2)2 & $-0.381^{***}$ & $-0.307^{***}$ & & & $1.808^{***}$ & & & & & & & \\
& $(-3.967)$ & $(-3.202)$ & & & $(15.131)$ & & & & & & & \\
poly(ROA, 2)1 & $-2.520^{***}$ & $-2.685^{***}$ & & & & $-6.478^{***}$ & & & & & & \\
& $(-10.658)$ & $(-11.346)$ & & & & $(-66.153)$ & & & & & & \\
poly(ROA, 2)2 & $-1.987^{***}$ & $-1.961^{***}$ & & & & $-0.103$ & & & & & & \\
& $(-11.164)$ & $(-11.039)$ & & & & $(-0.912)$ & & & & & & \\
poly(CFO, 2)1 & $-2.219^{***}$ & $-2.349^{***}$ & & & & & $-5.851^{***}$ & & & & & \\
& $(-10.461)$ & $(-11.399)$ & & & & & $(-60.246)$ & & & & & \\
poly(CFO, 2)2 & $3.444^{***}$ & $3.281^{***}$ & & & & & $2.536^{***}$ & & & & & \\
& $(22.091)$ & $(21.086)$ & & & & & $(21.182)$ & & & & & \\
poly(BTM, 2)1 & $-0.315^{***}$ & $-0.288^{***}$ & & & & & & $-0.882^{***}$ & & & & \\
& $(-3.768)$ & $(-3.406)$ & & & & & & $(-12.263)$ & & & & \\
poly(BTM, 2)2 & $0.046$ & $0.077$ & & & & & & $0.590^{***}$ & & & & \\
& $(0.582)$ & $(0.963)$ & & & & & & $(7.778)$ & & & & \\
poly(GROWTH, 2)1 & $0.431^{***}$ & $0.482^{***}$ & & & & & & & $0.826^{***}$ & & & \\
& $(6.145)$ & $(6.971)$ & & & & & & & $(10.033)$ & & & \\
poly(GROWTH, 2)2 & $-0.233^{***}$ & $-0.288^{***}$ & & & & & & & $1.298^{***}$ & & & \\
& $(-3.318)$ & $(-4.113)$ & & & & & & & $(14.251)$ & & & \\
poly(ABSACCRL, 2)1 & $1.299^{***}$ & $1.375^{***}$ & & & & & & & & $4.043^{***}$ & & \\
& $(15.240)$ & $(16.018)$ & & & & & & & & $(48.167)$ & & \\
poly(ABSACCRL, 2)2 & $-0.470^{***}$ & $-0.489^{***}$ & & & & & & & & $-1.020^{***}$ & & \\
& $(-5.455)$ & $(-5.619)$ & & & & & & & & $(-11.227)$ & & \\
poly(ALTMAN, 2)1 & $0.362^{***}$ & $0.434^{***}$ & & & & & & & & & $-3.508^{***}$ & \\
& $(3.427)$ & $(4.219)$ & & & & & & & & & $(-37.658)$ & \\
poly(ALTMAN, 2)2 & $0.177^{*}$ & $0.211^{**}$ & & & & & & & & & $1.280^{***}$ & \\
& $(1.951)$ & $(2.315)$ & & & & & & & & & $(11.271)$ & \\
poly(STDEARN, 2)1 & $1.557^{***}$ & $1.821^{***}$ & & & & & & & & & & $-1.212^{***}$ \\
& $(21.667)$ & $(25.899)$ & & & & & & & & & & $(-21.981)$ \\
poly(STDEARN, 2)2 & $-0.840^{***}$ & $-0.992^{***}$ & & & & & & & & & & $1.155^{***}$ \\
& $(-13.228)$ & $(-15.603)$ & & & & & & & & & & $(19.654)$ \\
Industry and Year F.E. Included & Yes & No & No & No & No & No & No & No & No & No & No & No \\
Adjusted $R^2$ & 0.2622 & 0.2425 & \\
\end{tabularx}
\end{ThreePartTable}
\end{sidewaystable}
}
\end{document}