\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage[round]{natbib}
\let\cite\citep




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%

\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[ngerman,english]{babel}










\begin{document}

\title{BACA methods}



\author[1]{Kok Ben Toh}%
\affil[1]{Affiliation not available}%


\vspace{-1em}



  
  \date{May 04, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup








\sloppy


Subsequently, the Ba/Ca at each site and at global (i.e. all sites)
level was modeled using~ Linear Mixed Effects (LME) models (Wood 2006)
with random intercept. The fixed predictors were~\emph{in-situ~}seawater
variables which include ``Sal'' ``Temp,'' suspended solids (SS) (i.e.
either ``TSS'', ``OSS'' or ``ISS''), and sedimentation rate (SD) (i.e.
either ``TSD'', ``OSD'' or ``ISD''), while the random effect was ``id''
(individual colony). Due to the significant collinear relationship among
the total, organic and inorganic components, only one of the component
of SS and SD was used as predictor to avoid unstable parameter estimates
(Pinheiro and Bates 2000). A continuous autoregressive(1) correlation
structure was also incorporated into the model to account for temporal
correlation between BA/CA readings, or mismatch of data due to the
monthly spot measurements.

We heuristically tested all combinations of the predictors, including
all possible two-way interaction terms, with a limit of five predictors
per model. The best five models based on AICc were selected for each
site, and at the global level (i.e. all sites). We then used the
leave-one-out-cross-validation method (LOOCV, James et al 2013) to
assess the predictive performance of the selected models. In brief, n-1
observations were used to estimate the parameters for each model, and to
predict the mean response of the left-out observation. The square error
was calculated and the previous step was repeated n times, i.e. until
all observation were left-out once. The normalized cross-validated
residual mean standard error (NRMSE) (or root mean square error?) for
each model was calculated and compared: model with smaller NRMSE is
better. All statistical analyses were performed using the statistical
program R (version 3.0.3) (R Core Team 2014), using packages `stats',
`nlme' (Pinheiro et al. 2017), and `glmulti' (Calcagno \& Mazancourt
2010). ~

References

Calcagno V., \& Mazancourt C. (2010). glmulti: An R Package for Easy
Automated Model Selection with (Generalized) Linear Models. Journal of
Statistical Software, 34(12): 1-29.

James, G., Witten, D., Hastie, T., \& Tibshirani, R. (2013). \emph{An
Introduction to Statistical Learning}. New York, NY: Springer New York.
https://doi.org/10.1007/978-1-4614-7138-7

\par\null

\#\#\#\# Original

Subsequently, Linear Mixed Effects (LME) models (Wood 2006) were used to
test multi-level relationships (i.e. at each site and for all sites)
between Ba/Cacoral vs. \emph{in-situ} seawater variables. For the full
site-level LME model, fixed effects components included the predictors
``Sal'' ``Temp,'' suspended solids (SS) (i.e. either ``TSS'', ``OSS'' or
``ISS''), and sedimentation rate (SD) (i.e. either ``TSD'', ``OSD'' or
``ISD''), and random effect in ``id'' (individual colony). Despite some
differences in the temporal variation of the total, organic and
inorganic components of SS as well as SD, the component terms were
significantly collinear (Fig. S3). As such, only one term of each
predictor variable was used to avoid unstable parameter estimates from
the LME models (Pinheiro and Bates 2000). We heuristically tested all
permutations for the LME models (a total of 930 models) to search for
the best 5 models based on AICC for each site, and at the global level
(i.e. all sites). All models had each individual coral as a random
effect along with a continuous temporal autoregressive correlation
structure i.e. allowing values \selectlanguage{ngerman}± 1 month to correlate with each other
(to account for possible temporal lag or mismatch of data due to the
monthly spot measurements). The top models fits were tested using the
leave-one-out-cross-validation method (LOOCV) (REF). In brief, n-1 data
points to train a potential model and letting it predict the value of
the left-out data point. The square error for each LOOCV run was
obtained and repeated n times, and cross-validated residual mean
standard error normalized to the range of observed values (NRMSE) for
each model calculated. All statistical analyses were performed using the
statistical program R (version 3.0.3) (R Core Team 2014), using packages
``stats'', ``nlme'' (Pinheiro et al. 2017), caret (REF) and glmulti
(REF).

\selectlanguage{english}
\FloatBarrier
\end{document}

