acf2: Function for computing autocorrelations

Description Usage Arguments See Also Examples

View source: R/functions.R

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

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

MinimumDistance documentation built on Nov. 8, 2020, 11:11 p.m.