residuals.bHP: Residuals.bHP

View source: R/methods.R

residuals.bHPR Documentation

Residuals.bHP

Description

Extract the final cycle component for class bHP.

Usage

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

Arguments

x

an object of class bHP

Value

the estimated cycle 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

residuals(bx_HP)

residuals(bx_ADF)

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