tsdist_ccf | R Documentation |
Minimum correlation distance considering a +- max lag (lag_max)
tsdist_ccf( ts1, ts2, type = c("correlation", "covariance"), cor_type = "abs", directed = FALSE, lag_max = 10, return_lag = FALSE )
ts1 |
Array. Time series 1 |
ts2 |
Array. Time series 2 |
type |
String. "correlation" or "covariance" to be used (type) in the ccf function. |
cor_type |
String. "abs" (default), "+", or "-". "abs" considers the correlation absolute value. "+" only positive correlations and "-" only negative correlations. |
directed |
Boolean. If FALSE (default), the lag interval [-lag_max,+lag_max] is considered. Otherwise, [-lag_max,0] is considered. |
lag_max |
Integer. Default = 10. |
return_lag |
Also returns the time lag that leads to the shortest distances. |
Distance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.