Hello, I want to perform a panel data analysis. I want to obtain the results shown below as an example with Bai and Carrion-i-Silvestre (2009) - Panel unit root test. But even with these codes I use, I can't get this result. Which library and code should I use?
new; cls; library carrionlib; // Load data test_data = loadd(__FILE_DIR $+ "brics.xlsx", "lco2"); // Time periods bigt = 29; ncross = rows(test_data)/bigT; // Create wide panel data lco2_wide = reshape(test_data, ncross, bigT)'; // Declare control structurea struct breakControl bCtl; // Number of breaks m = 3; // Model model = 4|m|1|1|2; // Set the number of factors k = 2; // Number of maximum factors to allow // and estimation method kmax = 3|1; // AR degress p_ar = 0; // Datevec datevec = 0; { Z_test, test_n, test_chi, Z_test_sim, test_n_sim, test_chi_sim, fhat } = panelbreak(lco2_wide, model, p_ar, kmax, datevec); print "Z test: " Z_test; print "Pval (normal): " test_n; print "Pval (Chi-square): " test_chi; print; print "Simplified tests"; print "Z test: " Z_test_sim; print "Pval (normal): " test_n_sim; print "Pval (Chi-square): " test_chi_sim;</blockquote>
1 Answer
0
accepted
Thank you for your question. I was able to locate the publication where the sample results you provided are located.
Are you hoping to replicate this table? The examples in the carrionlib do not correspond to this paper and will not replicate this table. You would need to contact the authors directly for more information about the data being used.
More generally, the panelbreak
procedure returns six different test results:
Variable | Description |
---|---|
z_test | Test statistic based on the moments. |
test_n | Test statistic based on p-values using the N(0,1) distribution. |
test_chi | Test statistic based on p-values using the Chi-squared(2N) distribution. |
z_test_sim | Simplified test statistic based on the moments. |
test_n_sim | Simplified test statistic based on p-values using the N(0,1) distribution. |
test_chi_sim | Simplified test statistic based on p-values using the Chi-squared(2N) distribution. |
fhat | Matrix with the estimated common factors. |
The sample code you provided will print each of these statistics to the GAUSS Command Window. Alternatively, you can open these from the Symbol Window on the GAUSS Data Editor tab.
Your Answer
1 Answer
Thank you for your question. I was able to locate the publication where the sample results you provided are located.
Are you hoping to replicate this table? The examples in the carrionlib do not correspond to this paper and will not replicate this table. You would need to contact the authors directly for more information about the data being used.
More generally, the panelbreak
procedure returns six different test results:
Variable | Description |
---|---|
z_test | Test statistic based on the moments. |
test_n | Test statistic based on p-values using the N(0,1) distribution. |
test_chi | Test statistic based on p-values using the Chi-squared(2N) distribution. |
z_test_sim | Simplified test statistic based on the moments. |
test_n_sim | Simplified test statistic based on p-values using the N(0,1) distribution. |
test_chi_sim | Simplified test statistic based on p-values using the Chi-squared(2N) distribution. |
fhat | Matrix with the estimated common factors. |
The sample code you provided will print each of these statistics to the GAUSS Command Window. Alternatively, you can open these from the Symbol Window on the GAUSS Data Editor tab.