Estimate time-kernel (periodic × RBF) parameters from empirical ACF
infer_time_kernel_params.Rd
Forms an across-site time–time correlation matrix of `z_infer` (pairwise complete), averages super-diagonals by lag to get an empirical ACF, then fits a product kernel `k(h)=k_per(h; alpha, period) * k_rbf(h; theta)` by least-squares.
Arguments
- data
Data frame with column `z_infer` and facetting columns `id`, `t` (times fastest within site).
- period
Numeric period used in the periodic kernel.
- nt
Integer, number of time points.
- n
Integer, number of sites.
- plot
Logical; if `TRUE`, show empirical vs fitted correlation–lag curve.
- max_pairs
Integer; optional downsampling of per-lag pairs for speed.
- lower
A vector of length 2 with lower bounds of search
- upper
A vector of length 2 with upper bounds of search