% --- CLEAN PREAMBLE (one documentclass, one geometry, load graphicx, hyperref last)
\documentclass[letterpaper]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[
% \usepackage{xcolor}
 top=2.5cm,bottom=3.2cm,left=3cm,right=3cm,
  marginparwidth=1.75cm,footskip=15mm
]{geometry}

\usepackage{microtype}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphicx}
\usepackage{authblk}
\usepackage{float}     % for [H]
\usepackage{placeins}  % for \FloatBarrier
\usepackage{hanging}   % for hanging indent in References


\usepackage{lineno}
\usepackage{setspace}

% --- Load hyperref LAST ---
\usepackage[colorlinks=true, allcolors=blue]{hyperref}

% ---------- Title/Authors ----------
\title{Supplementary Material for\\
Fixed Pre-Season Weather Windows Eliminate Endogeneity Bias in Interval-Censored Survival Models of Grapevine Phenology}


\author[1,2,*]{Sara Behnamian}
\author[3]{Fatemeh Fogh}

\affil[1]{Department of Biology, Faculty of Science, Lund University, Lund, Sweden}
\affil[2]{Section for GeoGenetics, Globe Institute, Faculty of Health and Medical Sciences, University of Copenhagen, Copenhagen, Denmark}
\affil[3]{Department of Electrical Engineering and Computer Science, Florida Atlantic University, Boca Raton, FL, USA}
\affil[*]{Corresponding author: \texttt{sara.behnamian@biol.lu.se}}


\date{}
\begin{document}
\linenumbers
\doublespacing
\maketitle

\section*{Supplementary Material}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.9\linewidth]{RE1_A1_comparison_open_flowers.png}
  \caption{Systematic comparison of modeling approaches for \emph{Open flowers}. Left: sample sizes used vs.\ discarded by each method. Right: median DOY estimates across methods.}
  \label{fig:supp-flowers}
\end{figure}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.9\linewidth]{RE1_A1_comparison_ripe_fruits.png}
  \caption{Systematic comparison of modeling approaches for \emph{Ripe fruits}. Left: sample sizes used vs.\ discarded by each method. Right: median DOY estimates across methods.}
  \label{fig:supp-fruits}
\end{figure}
\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.48\linewidth]{RE1_A3_qq_loglogistic_ripe_fruits.png}
  \includegraphics[width=0.48\linewidth]{RE1_A3_qq_loglogistic_open_flowers.png}
  \caption{Cox-Snell residual QQ-plots for Log-Logistic AFT models. Left: \emph{Ripe fruits} shows reasonable adherence to the Exp(1) reference line. Right: \emph{Open flowers} shows departures reflecting the high right-censoring rate (40\%).}
  \label{fig:supp-qq}
\end{figure}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.48\linewidth]{RE1_A3_hazard_ripe_fruits.png}
  \includegraphics[width=0.48\linewidth]{RE1_A3_hazard_open_flowers.png}
  \caption{Hazard functions comparing Weibull (monotonic) and Log-Logistic (non-monotonic) for \emph{Ripe fruits} (left) and \emph{Open flowers} (right). The non-monotonic Log-Logistic hazard better captures phenological processes.}
  \label{fig:supp-hazard}
\end{figure}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.48\linewidth]{RE1_A3_survival_comparison_ripe_fruits.png}
  \includegraphics[width=0.48\linewidth]{RE1_A3_survival_comparison_open_flowers.png}
 \caption{Survival curve comparison showing parametric fits versus Kaplan-Meier for \emph{Ripe fruits} (left) and \emph{Open flowers} (right). Numbers right-censored: \emph{Ripe fruits}, 12 of 49 plant--site--years; \emph{Open flowers}, 20 of 50.}
  \label{fig:supp-surv}
\end{figure}
\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.9\linewidth]{RE1_S3_interval_distribution.png}
  \caption{Distribution of observation interval widths ($R - L$) for \emph{Open flowers} (left; $n = 30$ events) and \emph{Ripe fruits} (right; $n = 37$ events). Dashed red lines indicate medians (4 days for both); dotted blue lines indicate means (7.0 and 18.1 days, respectively). Most intervals are narrow ($\leq$7 days), providing precise timing information.}
  \label{fig:supp-interval}
\end{figure}
\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.9\linewidth]{RE1_S4_observation_patterns_open_flowers.png}
  \caption{Observation process analysis for \emph{Open flowers}. Censoring rates by site (top left), year (top right), and season (bottom left), with interval width distribution (bottom right). Late-season censoring (100\%) reflects biological constraints; early/mid-season rates are low (14--17\%).}
  \label{fig:supp-obs-flowers}
\end{figure}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.9\linewidth]{RE1_S4_observation_patterns_ripe_fruits.png}
  \caption{Observation process analysis for \emph{Ripe fruits}. Censoring rates by site (top left), year (top right), and season (bottom left), with interval width distribution (bottom right). The non-significant correlation between timing and censoring ($r = -0.08$, $p = 0.59$) supports non-informative censoring.}
  \label{fig:supp-obs-fruits}
\end{figure}

\begin{table}[!htbp]
\centering
\caption{Sensitivity of fixed-window time ratios to the growing-degree-day base temperature $T_b$. Pre-season GDD was recomputed at each $T_b$ over the same fixed windows, $z$-scored, and entered as the sole predictor in univariate interval-censored AFT models. TR is the time ratio per $+1$~SD increase in pre-season GDD.}
\label{tab:supp-tb}
\small
\begin{tabular}{lrrcc}
\hline
Endpoint & $T_b$ (\textdegree C) & Median GDD$_{\text{pre}}$ & Weibull TR (95\% CI) & Log--logistic TR (95\% CI) \\
\hline
Open flowers &  5 &  759 & 0.923 (0.727--1.172) & 0.904 (0.736--1.110) \\
Open flowers &  8 &  404 & 0.936 (0.739--1.186) & 0.913 (0.748--1.114) \\
Open flowers & 10 &  228 & 0.938 (0.738--1.193) & 0.917 (0.756--1.112) \\
Open flowers & 12 &   99 & 0.912 (0.712--1.168) & 0.908 (0.754--1.093) \\
\hline
Ripe fruits  &  5 & 1491 & 0.864 (0.830--0.899) & 0.960 (0.910--1.012) \\
Ripe fruits  &  8 &  974 & 0.864 (0.824--0.906) & 0.961 (0.916--1.009) \\
Ripe fruits  & 10 &  680 & 0.864 (0.813--0.917) & 0.962 (0.919--1.007) \\
Ripe fruits  & 12 &  434 & 0.878 (0.811--0.950) & 0.964 (0.922--1.008) \\
\hline
\end{tabular}
\end{table}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.95\linewidth]{RE3_R1C4_tb_sensitivity.png}
  \caption{Time ratios per $+1$~SD pre-season GDD estimated at four base temperatures for \emph{Open flowers} (left) and \emph{Ripe fruits} (right). Points show TR with 95\% Wald CIs; the dashed horizontal line marks TR $=1$ and the dotted vertical line the value used throughout the paper ($T_b=10^\circ$C). Despite a 7.7-fold change in the underlying GDD totals, estimates shift by at most 2.8\%.}
  \label{fig:supp-tb}
\end{figure}

\begin{table}[!htbp]
\centering
\caption{Sensitivity of fixed-window time ratios to plant heterogeneity. The homogeneous subset comprises the three wine grapes at Site~16610 (single site, common management, shared weather series). TR is the time ratio per $+1$~SD increase in pre-season GDD. Subset intervals are optimistic because the pre-season covariate varies only across years within a single site.}
\label{tab:supp-homog}
\small
\begin{tabular}{llrrcc}
\hline
Endpoint & Sample & $n$ & Cens.\ (\%) & Weibull TR (95\% CI) & Log--logistic TR (95\% CI) \\
\hline
Open flowers & Full sample        & 43 & 39.5 & 0.938 (0.738--1.193) & 0.917 (0.756--1.112) \\
Open flowers & Homogeneous subset & 33 & 39.4 & 1.034 (0.740--1.446) & 0.962 (0.779--1.187) \\
\hline
Ripe fruits  & Full sample        & 42 & 21.4 & 0.864 (0.813--0.917) & 0.962 (0.919--1.007) \\
Ripe fruits  & Homogeneous subset & 32 &  9.4 & 0.965 (0.939--0.992) & 0.954 (0.926--0.982) \\
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\centering
\caption{Sensitivity of fixed-window time ratios to the phenophase definition. ``First presence'' is the endpoint used throughout the paper (one or more open flowers, or one or more ripe fruits). ``BBCH-equivalent'' is the first visit at which the recorded intensity reaches 50\% or more, approximating BBCH~65 and BBCH~89. TR is the time ratio per $+1$~SD increase in pre-season GDD.}
\label{tab:supp-bbch}
\small
\begin{tabular}{llrrrcc}
\hline
Endpoint & Definition & $n$ & Cens.\ (\%) & Median $R$ & Weibull TR (95\% CI) & Log--logistic TR (95\% CI) \\
\hline
Open flowers & First presence    & 43 & 39.5 & 149.5 & 0.938 (0.738--1.193) & 0.917 (0.756--1.112) \\
Open flowers & BBCH-equivalent   & 43 & 55.8 & 154.0 & 0.788 (0.579--1.072) & 0.803 (0.629--1.023) \\
\hline
Ripe fruits  & First presence    & 42 & 21.4 & 207.0 & 0.864 (0.813--0.917) & 0.962 (0.919--1.007) \\
Ripe fruits  & BBCH-equivalent   & 42 & 23.8 & 230.0 & 0.875 (0.828--0.925) & 0.956 (0.911--1.004) \\
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\centering
\caption{Sensitivity of the bivariate fixed-window models to the choice of moisture covariate. ``Precipitation'' is the covariate used throughout the paper; ``water balance'' is $P-\mathrm{ET}_0$ over the same fixed window, with $\mathrm{ET}_0$ estimated by the Hargreaves--Samani formulation. TR is the time ratio per $+1$~SD increase in the covariate named.}
\label{tab:supp-wb}
\small
\begin{tabular}{llcc}
\hline
Endpoint & Specification & Weibull TR (95\% CI) & Log--logistic TR (95\% CI) \\
\hline
\multicolumn{4}{l}{\emph{Pre-season GDD}} \\
Open flowers & with precipitation & 0.944 (0.736--1.211) & 0.922 (0.747--1.137) \\
Open flowers & with water balance & 0.954 (0.734--1.239) & 0.928 (0.742--1.160) \\
Ripe fruits  & with precipitation & 0.791 (0.714--0.876) & 0.933 (0.876--0.993) \\
Ripe fruits  & with water balance & 0.802 (0.698--0.922) & 0.928 (0.865--0.994) \\
\hline
\multicolumn{4}{l}{\emph{Moisture covariate}} \\
Open flowers & precipitation & 1.028 (0.806--1.309) & 1.017 (0.827--1.249) \\
Open flowers & water balance & 1.043 (0.809--1.345) & 1.027 (0.824--1.279) \\
Ripe fruits  & precipitation & 0.919 (0.847--0.997) & 0.968 (0.923--1.015) \\
Ripe fruits  & water balance & 0.940 (0.844--1.047) & 0.965 (0.914--1.018) \\
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\centering
\caption{Sensitivity of the univariate fixed-window time ratios to the length of the pre-season window. Pre-season GDD was recomputed over DOY~1 to each window end, $z$-scored, and entered as the sole predictor, with all other pipeline elements held fixed. ``Inside'' is the number of observed events whose first detection falls within the window. Bold rows are the windows used throughout the paper. At DOY~195 the coverage filter removes the three Site~16610 plants in 2025, all right-censored, so that row is not a like-for-like comparison.}
\label{tab:supp-window}
\small
\setlength{\tabcolsep}{4pt}
\resizebox{\linewidth}{!}{%
\begin{tabular}{lrrrrrcc}
\hline
Endpoint & Window end & $n$ & Cens.\ (\%) & Inside & Median GDD$_{\text{pre}}$ & Weibull TR (95\% CI) & Log--logistic TR (95\% CI) \\
\hline
Open flowers &  90 & 43 & 39.5 & 0 & 112 & 0.838 (0.655--1.073) & 0.868 (0.725--1.039) \\
Open flowers & 105 & 43 & 39.5 & 1 & 164 & 0.883 (0.688--1.133) & 0.891 (0.738--1.075) \\
\textbf{Open flowers} & \textbf{120} & \textbf{43} & \textbf{39.5} & \textbf{2} & \textbf{228} & \textbf{0.938 (0.738--1.193)} & \textbf{0.917 (0.756--1.112)} \\
Open flowers & 135 & 43 & 39.5 & 6 & 308 & 0.944 (0.744--1.199) & 0.923 (0.759--1.121) \\
\hline
Ripe fruits  & 150 & 42 & 21.4 &  0 & 405 & 0.887 (0.849--0.925) & 0.967 (0.927--1.010) \\
Ripe fruits  & 165 & 42 & 21.4 &  0 & 531 & 0.880 (0.838--0.924) & 0.970 (0.928--1.013) \\
\textbf{Ripe fruits}  & \textbf{180} & \textbf{42} & \textbf{21.4} & \textbf{2} & \textbf{680} & \textbf{0.864 (0.813--0.917)} & \textbf{0.962 (0.919--1.007)} \\
Ripe fruits  & 195 & 39 & 15.4 & 10 & 895 & 0.890 (0.835--0.948) & 0.972 (0.935--1.011) \\
\hline
\end{tabular}%
}
\end{table}

\begin{table}[!htbp]
\centering
\caption{Collinearity among fixed-window pre-season features, evaluated on the analysis sets used for the bivariate models ($n=43$ for \emph{Open flowers}, $n=42$ for \emph{Ripe fruits}). Entries are Pearson correlations; the final column gives the variance-inflation factor when all listed features are entered jointly. Only GDD and precipitation enter the models reported in the paper, and for that pair the VIF is 1.11 and 1.22 respectively. Heat days are omitted for \emph{Open flowers} because no day before DOY~120 reached $35^\circ$C in any site-year.}
\label{tab:supp-collin}
\small
\begin{tabular}{lrrrrrrr}
\hline
Feature & GDD & Precip. & $\overline{T}_{\min}$ & $\overline{T}_{\max}$ & Frost & Heat & VIF \\
\hline
\multicolumn{8}{l}{\emph{Open flowers} (DOY~1--120)} \\
GDD                    &  1.00 & $-0.31$ &  0.83 &  0.89 & $-0.78$ & --- &  9.5 \\
Precipitation          & $-0.31$ &  1.00 & $-0.02$ & $-0.26$ &  0.07 & --- &  2.6 \\
$\overline{T}_{\min}$  &  0.83 & $-0.02$ &  1.00 &  0.95 & $-0.97$ & --- & 26.7 \\
$\overline{T}_{\max}$  &  0.89 & $-0.26$ &  0.95 &  1.00 & $-0.96$ & --- & 62.9 \\
Frost days             & $-0.78$ &  0.07 & $-0.97$ & $-0.96$ &  1.00 & --- & 47.5 \\
\hline
\multicolumn{8}{l}{\emph{Ripe fruits} (DOY~1--180)} \\
GDD                    &  1.00 & $-0.42$ &  0.57 &  0.73 & $-0.40$ &  0.82 & 11.7 \\
Precipitation          & $-0.42$ &  1.00 & $-0.27$ & $-0.54$ &  0.34 & $-0.58$ &  2.5 \\
$\overline{T}_{\min}$  &  0.57 & $-0.27$ &  1.00 &  0.90 & $-0.94$ &  0.45 & 17.5 \\
$\overline{T}_{\max}$  &  0.73 & $-0.54$ &  0.90 &  1.00 & $-0.90$ &  0.72 & 68.3 \\
Frost days             & $-0.40$ &  0.34 & $-0.94$ & $-0.90$ &  1.00 & $-0.41$ & 43.4 \\
Heat days              &  0.82 & $-0.58$ &  0.45 &  0.72 & $-0.41$ &  1.00 &  5.7 \\
\hline
\end{tabular}
\end{table}

\begin{figure}[!htbp]
  \centering
  \includegraphics[width=0.95\linewidth]{RE3_R2C_window_sensitivity.png}
  \caption{Time ratios per $+1$~SD pre-season GDD estimated at four pre-season window lengths for \emph{Open flowers} (left) and \emph{Ripe fruits} (right). Points show TR with 95\% Wald CIs for Weibull (blue circles) and log--logistic (red squares); the dashed horizontal line marks TR $=1$ and the dotted vertical line the window used throughout the paper. Numerals above each panel give the count of observed events whose detection falls inside that window. Ripening estimates are stable; flowering estimates drift toward unity as more events fall inside the window.}
  \label{fig:supp-window}
\end{figure}

\begin{table}[!htbp]
\centering
\caption{Model selection criteria for interval-censored AFT models. Log-Logistic is consistently favored over Weibull based on AIC and BIC.}
\label{tab:supp-model-selection}
\begin{tabular}{llcccc}
\hline
Endpoint & Model & Log-Likelihood & AIC & BIC & $\Delta$AIC \\
\hline
Open flowers & Weibull & $-158.4$ & 320.8 & 324.7 & 12.5 \\
Open flowers & Log-Logistic & $-152.2$ & 308.3 & 312.1 & 0.0 \\
Ripe fruits & Weibull & $-137.4$ & 278.8 & 282.5 & 39.2 \\
Ripe fruits & Log-Logistic & $-117.8$ & 239.5 & 243.3 & 0.0 \\
\hline
\end{tabular}

\end{table} % end of Table 7

\clearpage

\begin{table}[H] % beginning of Table 8
\centering
\caption{Model classification and priority. Models ranked by BIC within each endpoint. Primary models (bold) are used for inference; diagnostic models demonstrate endogeneity bias only.}
\label{tab:supp-model-priority}
\small
\begin{tabular}{llcccl}
\hline
Endpoint & Model & Params & AIC & BIC & Classification \\
\hline
\multicolumn{6}{l}{\emph{Open flowers}} \\
& \textbf{Univariate Log-Logistic (fixed-window)} & 3 & 280.4 & 285.7 & \textbf{Primary} \\
& Bivariate Log-Logistic (fixed-window) & 4 & 282.3 & 289.4 & Alternative \\
& Univariate Weibull (fixed-window) & 3 & 290.9 & 296.2 & Alternative \\
& Bivariate Weibull (fixed-window) & 4 & 292.9 & 299.9 & Alternative \\
& Multivariate (to-cutoff) & 6+ & --- & --- & Diagnostic \\
\hline
\multicolumn{6}{l}{\emph{Ripe fruits}} \\
& \textbf{Univariate Log-Logistic (fixed-window)} & 3 & 214.0 & 219.2 & \textbf{Primary} \\
& Bivariate Log-Logistic (fixed-window) & 4 & 214.3 & 221.2 & Alternative \\
& Univariate Weibull (fixed-window) & 3 & 236.9 & 242.1 & Alternative \\
& Bivariate Weibull (fixed-window) & 4 & 235.3 & 242.3 & Alternative \\
& Multivariate (to-cutoff) & 6+ & --- & --- & Diagnostic \\
\hline
\end{tabular}
\end{table}

\end{document}