calculate_non_linearity: Generates the non linearity factor of a ts object.

Description Usage Arguments Value Examples

Description

This function generates the non linearity factor of a time series object. The Teraesvirta's neural network test for neglected nonlinearity is applied. 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'. The code is adopted from Hyndman, Rob J. which provides him under: https://robjhyndman.com/hyndsight/tscharacteristics/

Usage

1
2
calculate_non_linearity(ts, na_option = "mean", scale = TRUE,
  type = "Chisq")

Arguments

ts

A time series object.

na_option

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

scale

Boolean, whether the data should be scaled before computing the test statistic. Default value is 'TRUE'.

type

String indicating whether the Chi-Squared test or the F-test is computed. Thus, valid are "Chisq" (default) and "F".

Value

The non linearity factor 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.