Description Usage Arguments Value Note Author(s) See Also Examples

autocorrelation of a sequence

1 |

`X` |
a numeric vector or |

`k` |
the number of lags for which to compute the autocorrelation. Default: 1 |

`na.rm` |
a boolean, which if TRUE, indicates that NA values should be removed from the series prior to computing the autocorrelation. Default: FALSE |

Returns the lag `k`

autocorrelation of `X`

, e.g., the correlation
of `X[i]`

with `X[i-k]`

.

It's a bit surprising that this is not a part of the core **R** distribution,
but I can't find it. Perhaps it was thought to be too trivial to include.

Matthew Clegg [email protected]

1 2 3 4 5 6 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.