R/estimateDelayFrac.R
estimateDelayFrac.Rd
Optimises the delay TDopt
using lagFrac
to maximise the
correlation between the delayed input time series and (rises in) the
corresponding time series
estimateDelayFrac(
DATA,
rises = TRUE,
lag.max = hydromad.getOption("max.delay")
)
a ts
-like object with named components:
input (forcing) time series.
output (response) time series.
use only rises in the output to estimate delay.
largest delay (in time steps) to consider.
The estimated delay as an integer number of time steps.
estimateDelay
may be preferred if there's no good reason to
have a fractional lag/redistribution of the input across days.
L <- 0.6 ## Lag of 0.6
P <- c(2, 0, 5, 1, 6, 10, 0, 0, 0)
V1 <- lagFrac(P, L)
estimateDelay(cbind(P, V1), rises = FALSE)
#> [1] 0
estimateDelayFrac(cbind(U = P, Q = V1), lag.max = 5, rises = FALSE)
#> [1] 0.6000203