auto.corr: Calculating autocorrelation

View source: R/auto.corr.R

auto.corrR Documentation

Calculating autocorrelation

Description

Estimates the autocorrelation in the data. This function is used by other functions and will generally not be used directly by users.

Usage

auto.corr(x, model, tt = NULL, int = NULL, mstep = NULL)

Arguments

x

vector of sample means

model

the model being evaluated

Details

This function calculates the autocorrelation in a vector of sample means defined as the correlation of the first n-1 observations with the last n-1. The autocorrelation is calculated directly on the sample means if the evaluated model is stasis. If a different model is evaluated (random walk or directional trend), the data is detrended prior to the calculation of autocorrelation.

Value

the autocorrelation


klvoje/adePEM documentation built on Feb. 24, 2023, 1:28 p.m.