SADF_Y: SADF test statistic and the BADF sequence for a real time...

Description Usage Arguments Details Value Examples

View source: R/function_PSY.R

Description

This function computes the SADF test statistic and the BADF sequence for a real time series data

Usage

1
SADF_Y(y, r0, lag, select, clust_number)

Arguments

y

is a T x 1 numeric vector

r0

is the minimum window size fraction

lag

is the number of lags in the ADF regression

select

is a character object choosing either a "Fixed" number of lags in the ADF regression or by using the the "BIC"/"AIC" criteria

clust_number

is the number of clusters for parallel computation

Details

This function computes the SADF test statistic and BADF sequence for a real time series data. The minimum window size fraction suggested by PSY(2015) is r0=0.01+1.8/sqrt(length(y))

Value

results is a list containing the SADF test statistic and the BADF sequence

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
#Replicate the empirical analysis in Table 8 by PSY(2015)

path.bit <- system.file("extdata", "SP_DV.csv", package = "bubble")
SP_DV <- read.table(path.bit,  head = TRUE, sep = ";", fill=T, stringsAsFactors = FALSE)
SP_DV <- na.omit( SP_DV[,"PV.ratio", drop=F])
r0=0.01+1.8/sqrt(length(SP_DV[,1]))
sadf_test <-SADF_Y(SP_DV[,1], r0, 0 ,"Fixed",clust_number=8)

qe <-c(0.90,0.95,0.99)    #quantiles
m <- 1000
T=length(SP_DV[,1])
cv_sadf<- CV_SADF(qe,m,T,r0, address, clust_number=7)
cat(sadf_test$sadf, cv_sadf, sep = "\t")

## End(Not run)

deanfantazzini/bubble documentation built on Oct. 22, 2020, 2:43 p.m.