BTtest {BTtest} | R Documentation |
Barigozzi & Trapani (2022) Test
Description
Runs the testing routine proposed in Barigozzi & Trapani (2022) to estimate the number and types of common trends in a nonstationary panel.
The method can identify the existence of a common factor subject to a linear trend, as well as the number of zero-mean I(1)
and zero-mean I(0)
factors.
Usage
BTtest(X, r_max = 10, alpha = 0.05, BT1 = TRUE)
Arguments
X |
a |
r_max |
the maximum number of factors to consider. Default is 10. Note that chaning |
alpha |
the significance level. Default is 0.05. |
BT1 |
logical. If |
Details
For details on the testing procedure I refer to Barigozzi & Trapani (2022, sec. 4).
Value
A vector with the estimated number of (i) factors with a linear trend (r_1
), (ii) zero-mean I(1)
factors (r_2
) and (ii) zero-mean I(0)
factors (r_3
).
Author(s)
Paul Haimerl
References
Barigozzi, M., & Trapani, L. (2022). Testing for common trends in nonstationary large datasets. Journal of Business & Economic Statistics, 40(3), 1107-1122. doi:10.1080/07350015.2021.1901719
Examples
# Simulate a nonstationary panel
X <- sim_DGP(N = 100, n_Periods = 200)
# Obtain the estimated number of factors (i) with a linear trend (r_1), (ii) zero-mean I(1) (r_2)
# and (iii) zero-mean I(0) (r_3)
BTtest(X = X, r_max = 10, alpha = 0.05, BT1 = TRUE)