size_GSADF: Size of the generalized sup ADF (GSADF) statistic.

Description Usage Arguments Details Value Examples

View source: R/function_PSY.R

Description

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

Usage

1
size_GSADF(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 GSADF test

clust_number

is the number of clusters for parallel computation

Details

This function computes the size of the generalized sup ADF (GSADF) 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
26
## Not run: 
# Replicate sizes of the GSADF test in Table 2 by PSY(2015)
qe <-c(0.90,0.95,0.99)
m <- 1000           # number of replications
clust_number <- 7

table2_GSADF <- matrix(0, 5, 3)
table2_GSADF[1,1] <- size_GSADF(qe, m, 100, 0.190, 0 , "Fixed", 2.00, clust_number)
table2_GSADF[2,1] <- size_GSADF(qe, m, 200, 0.137, 0 , "Fixed", 2.08, clust_number)
table2_GSADF[3,1] <- size_GSADF(qe, m, 400, 0.100, 0 , "Fixed", 2.20, clust_number)
table2_GSADF[4,1] <- size_GSADF(qe, m, 800, 0.074, 0 , "Fixed", 2.34, clust_number)
table2_GSADF[5,1] <- size_GSADF(qe, m, 1600,0.055, 0 , "Fixed", 2.41, clust_number)

table2_GSADF[1,2] <- size_GSADF(qe, m, 100, 0.190, 3 , "Fixed", 2.00, clust_number)
table2_GSADF[2,2] <- size_GSADF(qe, m, 200, 0.137, 3 , "Fixed", 2.08, clust_number)
table2_GSADF[3,2] <- size_GSADF(qe, m, 400, 0.100, 3 , "Fixed", 2.20, clust_number)
table2_GSADF[4,2] <- size_GSADF(qe, m, 800, 0.074, 3 , "Fixed", 2.34, clust_number)
table2_GSADF[5,2] <- size_GSADF(qe, m, 1600,0.055, 3 , "Fixed", 2.41, clust_number)

table2_GSADF[1,3] <- size_GSADF(qe, m, 100, 0.190, 6 , "BIC", 2.00, clust_number)
table2_GSADF[2,3] <- size_GSADF(qe, m, 200, 0.137, 6 , "BIC", 2.08, clust_number)
table2_GSADF[3,3] <- size_GSADF(qe, m, 400, 0.100, 6 , "BIC", 2.20, clust_number)
table2_GSADF[4,3] <- size_GSADF(qe, m, 800, 0.074, 6 , "BIC", 2.34, clust_number)
table2_GSADF[5,3] <- size_GSADF(qe, m, 1600,0.055, 6 , "BIC", 2.41, clust_number)

## End(Not run)

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