Clark 1967 solution for calculating barometric efficiency (Algorithm from Batu 1998, pg 76)
Usage
be_clark_cpp(dep, ind, lag_space, inverse)
Arguments
- dep
numeric vector
of the dependent variable (ie:water level)
- ind
numeric vector
of the independent variable (ie:barometric pressure)
- lag_space
integer
spacing for lags, useful for higher frequency monitoring
- inverse
logical
whether the barometric relationship is inverse
Value
barometric efficiency using Clark's method
Examples
n <- 1000
baro <- sin(seq(0, 2 * pi, length.out = 1000))
wl <- -0.4 * baro + rnorm(1000, sd = 0.02)
be_clark_cpp(wl, baro, lag_space = 1, inverse = TRUE)
#> [1] 0.3961613