nanautocorr: Autocorrelation function

Description Usage Arguments Details Value Author(s)

View source: R/nanautocorr.R

Description

'nanautocorr' computes autocorrelation coefficient dealing with missing values

Usage

1
nanautocorr(data, nlags, R)

Arguments

data

vector of time series

nlags

maximum number of lags in the computation of ACF

R

number of lags until the model is supposed to have a significant AC coefficient (optional)

Details

Calculates the 'nlag' autocorrelation coefficient for a data vector containing missing values couples of data including 'NA' are excluded from the computation. Here the ACF is calculated using the Pearson\'s correlation coefficient for each lag.

Value

out vector of the ACF

Author(s)

Fabio Oriani, fabio.oriani@unine.ch, University of Neuchatel (CH) original author; Alessandro Bigi (abigi@unimore.it), University of Modena and Reggio Emilia (IT) for the R version


mannkendall/R documentation built on Feb. 2, 2022, 7:31 p.m.