rankacf | R Documentation |
Computes Spearman-autocorrelations when the observations contain NA
s.
If the observations do not contain NA
s, the function is consistent with the function acf applied to ranks.
rankacf(x,lag.max=length(x)-2)
x |
numeric input vector. |
lag.max |
maximum lag for which acf is estimated, automatically limited to one less than number of observations, should be positive integer. |
Estimated spearman autocorrelation up to lag.max.
x = rnorm(10) rankacf(x) acf(rank(x),plot=FALSE,lag.max = length(x)-2)$acf[-1,,1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.