functional_curves(): Updated the GAM formula to fit independent smooths per treatment by default (trt + s(time, by=trt)), avoiding artifactual drops (“caimento”) at the tails of flat curves. Added the global_smooth parameter to allow users to opt-in to the previous Global-Specific smoothing behavior.
simulate_dsp_data(): Adjusted the amplitudes of the simulated suppression profiles (“Early”, “Late”, “Persistent”) to achieve exactly a 70% reduction in AUDPC compared to the unsprayed control, representing a realistic fungicide efficacy scenario.
Updated _pkgdown.yml to include the newly exported functional PCA and DSP functions in the “Functional Analysis” reference index, resolving site build errors.
r4pde 0.2.0 (2026-04-26)
Major changes
Refactored the monolithic compare_curves() workflow into a modular functional analysis API.
compare_curves() is now a soft-deprecated wrapper around the new modular functions.
New functions
functional_pca(): Performs functional principal component analysis on fitted disease progress curves to decompose variation among epidemic trajectories into orthogonal temporal components. Includes plotting and extractor functions.
functional_curves(): Fits genotype-specific epidemic trajectories using GAM, with support for genotype-level covariates.
functional_distances(): Computes pairwise functional distances among fitted curves and performs hierarchical clustering and permutation testing.
functional_resistance(): Calculates Functional Resistance Index (FRI) and Stability-Adjusted Functional Resistance Index (SAFRI) with support for stratified rankings and bootstrap-supported classification.
suggest_k(): Helper function to recommend GAM smoothing parameters (k_smooth, k_trt, k_env, gamma) based on data structure; supports tidy-eval column names and can infer replication from a data frame.
Enhancements
Added support for genotype-level auxiliary covariates (e.g., heading_group) to adjust functional curves and resistance rankings, allowing for better distinction between genetic resistance and phenological escape.
Improved bootstrap methodology for resistance classification with support for stratified group comparisons.
Added functional_instability() for computing normalized functional instability (NFI) of genotype-by-environment epidemic curves, with optional decomposition into spatial and temporal components.