cor(x - mean(x), y - mean(y)) with explicit zero-norm guard.
Usage
morie_dsp_baseline_correlation(x, y)
Arguments
- x
Numeric vector.
- y
Numeric vector.
References
Rangayyan & Krishnan (2015), Ch. 5.
Examples
set.seed(1)
x <- rnorm(100)
morie_dsp_baseline_correlation(x, x) # identical inputs: 1
#> [1] 1