CV_SADF: Critical values for the sup ADF (SADF) statistic.

Description Usage Arguments Details Value Examples

View source: R/function_PSY.R

Description

This function computes the critical values for the sup ADF statistic by Phillips et al. (2015)

Usage

1
CV_SADF(qe, m, T, r0, address, clust_number)

Arguments

qe

is a q x 1 vector of quantiles

m

is the number of replications for the simulated DGP

T

is the number of simulated time steps

r0

is the minimum window size fraction

address

is a character object containing the address where the plot density of SADF test stat will be saved in png format

clust_number

is the number of clusters for parallel computation

Details

This function computes the critical values for the sup ADF statistic by Phillips et al. (2015) and saves the plot density of SADF test statistic as a png file in a specified address

Value

quantile_sadf a q x 1 vector of simulated critical values for the sup ADF statistic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 ## Not run: 
 # Replicate finite sample critical values in Table 1 for SADF by PSY(2015)
 qe <-c(0.90,0.95,0.99)
 address <- "D:/bubbletest/"
 m <- 1000           # number of replications
 table1_sadf <- matrix(0,5,length(qe))

 table1_sadf[1,] <- CV_SADF(qe,m,100,0.190,address,clust_number=8)
 table1_sadf[2,] <- CV_SADF(qe,m,200,0.137,address,clust_number=8)
 table1_sadf[3,] <- CV_SADF(qe,m,400,0.100,address,clust_number=8)
 table1_sadf[4,] <- CV_SADF(qe,m,800,0.074,address,clust_number=8)
 table1_sadf[5,] <- CV_SADF(qe,m,1600,0.055,address,clust_number=8)

 write.table( table1_sadf,paste0(address, "table1_sadf.csv"), row.names = F, col.names =F)
   
## End(Not run)

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