Description Usage Arguments Details Value Examples
This function computes the critical values for the generalized sup ADF (GSADF) statistic by Phillips et al. (2015)
1 |
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 |
beta |
is the significance level for the critical values for the BSADF sequence |
This function computes the simulated critical values for the GSADF statistic, the critical value sequence for the backward SADF (BSADF) statistic sequence by Phillips et al. (2015) and saves the plot density of BADF test statistic as a png file in a specified address The main difference between the SADF and GSADF tests on one side and BADF BSADF tests on the other side, lies in the data generating process: the SADF and GSADF tests use a random walk with an overall drift value of 1/T, while the the BADF BSADF tests use a random walk with an drift value of 1/r2 for each r2
results is a list containing quantile_gsadf (a q x 1 vector of simulated critical values for the GSADF statistic) and gsadf_cv (a (T-swindow0+1) vector containing the critical values for the BSADF sequence)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# Replicate Finite sample critical values in Table 1 for GSADF by PSY(2015)
qe <-c(0.90,0.95,0.99)
m <- 1000 # number of replications
address <- "D:/bubbletest/"
clust_number <- 7
beta=0.95
table1_gsadf <- matrix(0,5,length(qe))
table1_gsadf[1,] <- CV_GSADF(qe,m,100,0.190,address, clust_number, beta)$quantile_gsadf
table1_gsadf[2,] <- CV_GSADF(qe,m,200,0.137,address, clust_number, beta)$quantile_gsadf
table1_gsadf[3,] <- CV_GSADF(qe,m,400,0.100,address, clust_number, beta)$quantile_gsadf
table1_gsadf[4,] <- CV_GSADF(qe,m,800,0.074,address, clust_number, beta)$quantile_gsadf
table1_gsadf[5,] <- CV_GSADF(qe,m,1600,0.055,address, clust_number, beta)$quantile_gsadf
write.table( table1_gsadf,paste0(address, "table1_gsadf.csv"), row.names = F, col.names =F)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.