bng_panic¶
Purpose¶
Computes the Pe test on ADF p-values found in Bai & Ng (2004) using panel analysis of idiosyncratic and common components (PANIC) test of nonstationarity.
Format¶
-
{ ADFe, pval, lags, Pe, n_factors } =
bng_panic(y, model[, pmax, ic_lags, kmax, ic_factors])¶ Parameters: - y (TxN matrix) – Panel data to be tested.
- model (Scalar) –
Model to be implemented.
1 Constant. 2 Constant and trend. - pmax (Scalar) – Optional, the maximum number of lags for \(\Delta y\). Default = 8.
- ic_lags (Scalar) –
Optional, the information criterion used for choosing lags. Default = 3.
1 Akaike. 2 Schwarz. 3 t-stat significance. - kmax (Scalar) – Maximum number of factors. Default = 5.
- ic_factors (Scalar) –
Information Criterion for optimal number of factors. Default = 1.
1 PCp criterion. 2 ICp criterion.
Returns: - ADFe (Scalar) – ADF statistic for idiosyncratic components for each cross-section.
- pval (Scalar) – p-value of ADFe.
- lags (Scalar) – Number of lags selected by chosen information criterion.
- Pe (Scalar) – Pe statistic based on principal components with N(0,1).
- n_factors (Scalar) – Number of factors by chosen information criterion
Examples¶
library tspdlib;
// Load date file
y = loadd(__FILE_DIR $+ "PDe.dat");
/*
** Using the defaults
** for maximum number of lags,
** information criterions,
** and maximum number of factors.
*/
/*
** Model with constant
*/
model = 1;
{ ADFe, pval, lags, Pe, nf } = bng_panic(y, model);
Source¶
pd_panic.src
See also
Functions bng_panicnew(), jwl_panicadj(), jwr_panicca(), pd_stationary()