calculate_durbin_watson_test: Generates the autocorrelation measure of a data.frame object.

Description Usage Arguments Value Examples

Description

This function generates the autocorrelation measure of a data.frame object. It is based on the durbin watson test. The test is based on detrended data. The data.frame object should represent an multivariate ts. As input is only required an object from the class data.frame. 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
calculate_durbin_watson_test(df, targetcol, na_option = "mean")

Arguments

df

A data.frame object.

targetcol

A character containing a column name of the df.

na_option

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

Value

The autocorrelation measure of df. If the above input params are wrong, an error message is returned.

Examples

1
2
3

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