trendAnchor {RGAP}R Documentation

Trend anchor

Description

Computes the anchored trend given a fitted object of class NAWRUfit, TFPfit, or KuttnerFit.

Usage

trendAnchor(fit, anchor = NULL, h = NULL, returnFit = FALSE)

Arguments

fit

An object of class NAWRUfit, TFPfit, or KuttnerFit.

anchor

A numeric specifying the anchor value. If unspecified, anchor is taken from the object fit (if specified).

h

An integer specifying the anchor horizon in the frequency of the underlying model. If unspecified, h is taken from the object fit (if specified).

returnFit

A logical. If TRUE, an object of the same class as fit including the anchored trend is returned. If FALSE, only the anchored trend time series is returned.

Value

A fitted object if returnFit = TRUE or a time series with the anchored trend.

Examples

# define nawru model for France
data("gap")
tsList <- amecoData2input(gap$France)
model <- NAWRUmodel(tsl = tsList)

# estimate nawru model

f <- fit(model = model)

# compute anchored nawru
anchoredNawru <- trendAnchor(fit = f, anchor = 6.5, h = 10)


[Package RGAP version 0.1.1 Index]