predict.bHP: Predict.bHP

View source: R/methods.R

predict.bHPR Documentation

Predict.bHP

Description

Extract the final trend component for class bHP.

Usage

## S3 method for class 'bHP'
predict(x)

Arguments

x

an object of class bHP

Value

the estimated trend component

Examples

lam <- 100 # tuning parameter for the annual data

data(IRE) # load the data 'IRE'

# raw HP filter
bx_HP <- BoostedHP(IRE, lambda = lam, iter = FALSE)

# by ADF
bx_ADF <- BoostedHP(IRE, lambda = lam, iter = TRUE, stopping = "adf", sig_p = 0.050)

# return the final trend component

predict(bx_HP)

predict(bx_ADF)

chenyang45/BoostedHP documentation built on Nov. 12, 2022, 11:36 a.m.