BIC.bHP | R Documentation |
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.
## S3 method for class 'bHP' BIC(x)
x |
an object of class |
a vector recording BIC after each iteration of bHP.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.