BIC.bHP: BIC.bHP

View source: R/methods.R

BIC.bHPR Documentation

BIC.bHP

Description

Extract the path of BIC value of each iterated BIC HP-filter conduction for class bHP. As nonstop type of bHP also keeps BIC for each iteration time till the Max_iter, BIC.bHP method returns BIC value for it as well.

Usage

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

Arguments

x

an object of class bHP

Value

a vector recording BIC after each iteration of bHP.

Examples

lam <- 100 # tuning parameter for the annual data

data(IRE) # load the data 'IRE'

# by BIC

bx_BIC <- BoostedHP(IRE, lambda = lam, iter= TRUE, stopping = "BIC")

BIC(bx_BIC)


bx_none <- BoostedHP(IRE, lambda = lam, iter= TRUE, stopping = "nonstop")

BIC(bx_none)



### If the test type is not "adf", Pvalue.bHP will return error

# raw HP filter

bx_HP <- BoostedHP(IRE, lambda = lam, iter= FALSE)

BIC(bx_HP)

# Error in BIC.bHP(bx_HP) :
# The stationary test type is none-iter, not BIC or none.


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

BIC(bx_ADF)

#Error in BIC.bHP(bx_ADF) :
#The stationary test type is adf, not BIC or none.


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