size_SADF: Size of the sup ADF test

Description Usage Arguments Details Value Examples

View source: R/function_PSY.R

Description

This function computes the size of the sup ADF statistic to replicate the results in Table 2 by Phillips et al. (2015)

Usage

1
size_SADF(qe, m, T, r0, lag, select, cv, 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

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

cv

is the critical value of the SADF test

clust_number

is the number of clusters for parallel computation

Details

This function computes the size of the sup ADF statistic to replicate the results in Table 2 by Phillips et al. (2015),

Value

size is the size of the test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 ## Not run: 
 # Replicate sizes of the SADF test in Table 2 by PSY(2015)
 qe <-c(0.90,0.95,0.99)
 m <- 1000           # number of replications

 table2_SADF <- matrix(0, 5, 3)
 table2_SADF[1,1] <- size_SADF(qe, m, 100, 0.190, 0 , "Fixed", 1.30, clust_number=8)
 table2_SADF[2,1] <- size_SADF(qe, m, 200, 0.137, 0 , "Fixed", 1.40, clust_number=8)
 table2_SADF[3,1] <- size_SADF(qe, m, 400, 0.100, 0 , "Fixed", 1.49, clust_number=8)
 table2_SADF[4,1] <- size_SADF(qe, m, 800, 0.074, 0 , "Fixed", 1.53, clust_number=8)
 table2_SADF[5,1] <- size_SADF(qe, m, 1600,0.055, 0 , "Fixed", 1.57, clust_number=8)

 table2_SADF[1,2] <- size_SADF(qe, m, 100, 0.190, 3 , "Fixed", 1.30, clust_number=8)
 table2_SADF[2,2] <- size_SADF(qe, m, 200, 0.137, 3 , "Fixed", 1.40, clust_number=8)
 table2_SADF[3,2] <- size_SADF(qe, m, 400, 0.100, 3 , "Fixed", 1.49, clust_number=8)
 table2_SADF[4,2] <- size_SADF(qe, m, 800, 0.074, 3 , "Fixed", 1.53, clust_number=8)
 table2_SADF[5,2] <- size_SADF(qe, m, 1600,0.055, 3 , "Fixed", 1.57, clust_number=8)

 table2_SADF[1,3] <- size_SADF(qe, m, 100, 0.190, 6 , "BIC", 1.30, clust_number=8)
 table2_SADF[2,3] <- size_SADF(qe, m, 200, 0.137, 6 , "BIC", 1.40, clust_number=8)
 table2_SADF[3,3] <- size_SADF(qe, m, 400, 0.100, 6 , "BIC", 1.49, clust_number=8)
 table2_SADF[4,3] <- size_SADF(qe, m, 800, 0.074, 6 , "BIC", 1.53, clust_number=8)
 table2_SADF[5,3] <- size_SADF(qe, m, 1600,0.055, 6 , "BIC", 1.57, clust_number=8)
 
## End(Not run)

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