Learn R Programming

utsf (version 1.2.0)

trend: Specifying the transformation for dealing with trended series

Description

This function is used to specify the preprocessing associated with the trend of a time series.

Usage

trend(type = "additive", n = -1, transform_features = FALSE)

Value

A list with the selected options

Arguments

type

A character indicating the type of preprocessing applied to the time series. Possible values are: "none", "additive", "multiplicative" and "differences".

n

An integer specifying the order of first differences to be applied. If the default (-1) is used, the order of first differences needed by the time series will be estimated by the forecast::ndiffs() function. This parameter is only meant when the type parameter is "differences".

transform_features

A logical value indicating whether the training features are also transformed with the additive or multiplicative transformation.

Examples

Run this code
trend("none")            # no preprocessing
trend("additive")        # additive preprocessing
trend("differences", 1)  # order 1 first differences
trend("differences", -1) # order of first differences automatically estimated

Run the code above in your browser using DataLab