calculate_autocorrelation: Generates the mean of the autocorrelationfunction (ACF) of a...

Description Usage Arguments Value Examples

Description

This is a function to generate the mean of the ACF of a time series object. As input is only required an object from the class time series. Otherwise the function returns an error message. Also, for na_option is only required the string 'mean' or'kalman' allowed. This means, that all na values are either replaced by the mean, or kalman imputation of the ts. The standard value of na_option is 'mean'.

Usage

1
2
calculate_autocorrelation(ts, na_option = "mean", type = "covariance",
  demean = TRUE)

Arguments

ts

A time series object.

na_option

A string value containing either 'mean' or'kalman'; Standard values is 'mean'.

type

String giving the type of acf to be computed. Allowed values are "correlation" (the default), "covariance" or "partial". Will be partially matched.

demean

True/False boolean. Should the covariances be about the sample means?

Value

The mean of the ACF of ts. If the above input params are wrong, an error message is returned.

Examples

1

mowomoyela/tstaxonomyr documentation built on May 15, 2019, 4:47 p.m.