acf2 {MinimumDistance} | R Documentation

## Function for computing autocorrelations

### Description

By default, this function returns the lag-10 autocorrelations of a numeric vector and omits missing values.

### Usage

    acf2(x, lag.max = 10, type = c("correlation", "covariance", "partial"),
      plot = FALSE, na.action = na.omit, demean = TRUE, ...)

### Arguments

`x` | a numeric vector
`lag.max` | see `acf`
`type` | see `acf`
`plot` | logical, as in `acf`
`na.action` | ignored. Missing values are automattically omitted.
`demean` | logical, as in `acf`
`...` | additional arguments passed to `acf`

### See Also

`acf`

### Examples

    x <- rnorm(100)
    x[5] <- NA
    acf2(x)

[Package MinimumDistance version 1.24.1 Index]