Hello everyone,
I'd like to introduce a new STATA command called xttest4, now available on SSC. Thanks to Prof. Kit Baum.
xttest4 provides heteroskedasticity tests for fixed-T panel data models
I'd like to introduce a new STATA command called xttest4, now available on SSC. Thanks to Prof. Kit Baum.
Code:
ssc install xttest4, replace
- For fixed-effects models (FEM), xttest4 performs tests based on the artificial regression proposed by Juhl & Sosa-Escudero (2014). This includes two tests with alternative hypotheses corresponding to heteroskedasticity in cross-section units and heteroskedasticity in cross-section units and/or periods. When option kezdi is specified, xttest4 reports the test statistics proposed by Kezdi (2003), providing information on selecting the appropriate standard error form for FEM.
- For Random-effects models (REM), xttest4 performs tests based on the artificial regression proposed by Montes-Rosa & Sosa-Escudero (2011). Where, marginal and joint test statistics for homogeneity of error components are reported along with degrees of freedom and p-value.
Code:
. webuse abdata, clear . qui xtreg n k w ys if id <=100, fe . xttest4 Test for heteroscedasticity in fixed-T panel data models Model: Fixed-effects H0: Var(e_it X_i, u_i) = sigma^2 H1 Statistic df P-value sigma_it^2 16.125 3 0.001 sigma_i^2 10.294 3 0.016 . qui xtreg n k w ys, fe . xttest4, kezdi Test for heteroscedasticity in fixed-T panel data models Hypothesis Statistic df P-value H2 vs. Ha 26.734 7 0.000 H3 vs. Ha 24.862 7 0.001 H1 is missing due to unbalanced data H2: Serially uncorrelated: e_it, x_it or both H3: Homoskedasticity and serially uncorrelated Ha: Heteroskedasticity . qui xtreg n c.(k w ys)##c.(k w ys), re . xttest4 Test for heteroscedasticity in fixed-T panel data models Model: Random-effects H1: Var(u_i + e_it X_i) = sigma_it^2 Null hypothesis (H0) Statistic df P-value sigma_e^2 sigma_u^2 200.213 9 0.000 sigma_u^2 sigma_e^2 11.991 9 0.214 sigma_e^2 & sigma_u^2 212.204 18 0.000

Comment