## 2 Materials and Methods
### Modeling Approach  
Two regression models were developed for: (a) non-organic horizons (the most common class); (b) organic horizons. These two regressions only apply on a sample-by-sample basis, and did not consider the influence of sample layers above or below the specific horizon from which a given sample was taken. Adjustments for stony soils and for collections of samples in a profile are applied separately (i.e., post hoc) and are described in Section 1. In the modeling, 7 samples were dropped from the training data (none from the same profile) since they were assessed as being excessively influential, by inspection of the quantile plot of the deviance residuals. A total of 9 profiles were dropped as they were assessed as being anomalous after inspection of their characteristics compared to others in the same soil order. These anomalous profiles had functional horizon descriptions that were considered inconsistent for their soil order, as assessed by a pedologist. The statistical modelling was conducted in R version 4.3.1 [20]. The soil hydraulic PTF aimed to provide an estimate of the volumetric water content contained in a sample of soil, ranging from 0-1 (i.e., 0%-100%), given a specified tension or suction applied to the soil. The water content or response, \(\theta\), is a function of the tension, \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & & \multicolumn{8}{c}{**Response Tension**} \\ \cline{3-8}  & \multicolumn{2}{c}{**Total**} & \multicolumn{2}{c}{**Toposity**} & \(-\)**5 kPa** & \(-\)**10 kPa** & \(-\)**20 kPa** & \(-\)**40 kPa** & \(-\)**100 kPa** & \(-\)**1500 kPa** \\ \hline \multirow{8}{*}{**Condation**} & Num. samples & 2788 & 3520 & 3558 & 2944 & 2811 & 3041 & 4135 \\  & Minimum & 0.291 & 0.086 & 0.050 & 0.046 & 0.037 & 0.018 & 0.010 \\  & 2.5\% quantile & 0.372 & 0.250 & 0.174 & 0.128 & 0.107 & 0.085 & 0.037 \\  & Median & 0.527 & 0.419 & 0.394 & 0.373 & 0.354 & 0.325 & 0.186 \\  & Mean & 0.542 & 0.430 & 0.401 & 0.378 & 0.357 & 0.327 & 0.197 \\  & 97.5\% quantile & 0.741 & 0.635 & 0.614 & 0.601 & 0.581 & 0.552 & 0.393 \\  & Maximum & 0.939 & 0.850 & 0.820 & 0.737 & 0.727 & 0.705 & 0.566 \\ \hline \multirow{8}{*}{**Condation**} & Num. samples & 1174 & 1505 & 1518 & 1263 & 1223 & 1304 & 1757 \\  & Minimum & 0.314 & 0.080 & 0.054 & 0.049 & 0.041 & 0.029 & 0.014 \\  & 2.5\% quantile & 0.370 & 0.281 & 0.200 & 0.156 & 0.133 & 0.106 & 0.041 \\  & Median & 0.529 & 0.419 & 0.395 & 0.374 & 0.354 & 0.326 & 0.190 \\  & Mean & 0.541 & 0.431 & 0.402 & 0.379 & 0.356 & 0.326 & 0.198 \\  & 97.5\% quantile & 0.759 & 0.644 & 0.621 & 0.607 & 0.592 & 0.563 & 0.400 \\  & Maximum & 0.934 & 0.849 & 0.749 & 0.738 & 0.728 & 0.703 & 0.520 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Selected summary statistics for responses at all tensions, for both the training and validation sample subsets. \(\psi\) (i.e., \(\theta(\psi)\)). The \(\theta(\psi)\) ranges from zero (completely dry soil) to a value at saturation (at total porosity \(\theta_{0}=\theta_{\rm TP}\stackrel{{\rm def}}{{=}}\theta(\psi=0\) kPa)), and the PTF generated estimates of \(\theta(\psi)\) denoted by \(\hat{\theta}(\psi)\). This relationship between \(\theta\) and \(\psi\) is termed the'soil water retention curve'. In New Zealand, for historical reasons, sample data are most frequently available for tensions of 0 (total porosity, TP), \(-5\), \(-10\) (Field Capacity or FC), \(-20\), \(-40\), \(-100\), and \(-1500\) kPa (willing point or WP). Fewer than 1% of the data had response measurements for tensions other than these figures, and for this reason, the decision was made to only model the response at these 7 tension values. In the literature, a common approach is to model the response at each tension, providing marginal estimates of the \(\hat{\theta}(\psi_{i})\) for each specific tension \(\psi_{i}\).