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")
)

Arguments

DATA

a ts-like object with named components:

list("U")

input (forcing) time series.

list("Q")

output (response) time series.

rises

use only rises in the output to estimate delay.

lag.max

largest delay (in time steps) to consider.

Value

The estimated delay as an integer number of time steps.

Details

estimateDelay may be preferred if there's no good reason to have a fractional lag/redistribution of the input across days.

Author

Joseph Guillaume

Examples


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