This function computes the score of best lags by summing the correlation of corresponding lags
score(corr, lags)
| corr | a vector of computed correlation |
|---|---|
| lags | a vector of same length with corr that holds the lags corresponding to the corr vector |
a numerical value of best lag picked based on corr and lags
#> [1] 0#> [1] -1