pd_getcderror#
Purpose#
Computes error cross-section dependecy tests.
Format#
- { LMbp, LM_adj, CDlm, CDlm_adj, CD } = pd_getcderror(y, x, N)#
- Parameters:
y (TNx1 vector) – Long format dependent panel data.
x (TNx1 vector) – Long format independent panel data.
N (Scalar) – Number of cross-sections.
- Returns:
LMbp (Dataframe) – LM test of Breusch and Pagan (1980).
LM_adj (Dataframe) – Bias corrected LM test of Pesaran et al. (2008).
CDlm (Dataframe) – CDlm test of Pesaran (2004, 2020).
CDlm_adj (Dataframe) – Bias corrected CDlm test of Baltagi, Feng, Kao (2012).
CD (Dataframe) – CD test of Pesaran (2004, 2020).
Examples#
library tspdlib_dv;
// Number of cross-sections
N = 9;
// Load data
data = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/pdcause.dat");
// Call test
{ LMbp, LMadj , CDlm, CDlmadj, CD } = pd_getCDError(data[., "Y"], data[. , "X"], N);
Source#
pd_cdtests.src