powered by
This function computes the score of best lags by summing the correlation of corresponding lags
score(corr, lags)
a vector of computed correlation
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
# NOT RUN { score(runif(10, 0, 1), c(2, 0, 0, 0, 3, 2, -1, 2, 0, 1)) # }
Run the code above in your browser using DataLab