6.7.6. statsmodels.sandbox.regression.onewaygls¶
F test for null hypothesis that coefficients in several regressions are the same
- implemented by creating groupdummies*exog and testing appropriate contrast matrices
- similar to test for structural change in all variables at predefined break points
- allows only one group variable
- currently tests for change in all exog variables
- allows for heterogscedasticity, error variance varies across groups
- does not work if there is a group with only a single observation
6.7.6.1. TODO¶
- generalize anova structure, - structural break in only some variables - compare structural breaks in several exog versus constant only - fast way to construct comparisons
- print anova style results
- add all pairwise comparison tests (DONE) with and without Bonferroni correction
- add additional test, likelihood-ratio, lagrange-multiplier, wald ?
- test for heteroscedasticity, equality of variances - how? - like lagrange-multiplier in stattools heteroscedasticity tests
- permutation or bootstrap test statistic or pvalues
6.7.6.2. References¶
- Greene: section 7.4 Modeling and Testing for a Structural Break
- is not the same because I use a different normalization, which looks easier for more than 2 groups/subperiods
after looking at Greene: * my version assumes that all groups are large enough to estimate the coefficients * in sections 7.4.2 and 7.5.3, predictive tests can also be used when there are
insufficient (nobs<nvars) observations in one group/subperiods question: can this be used to test structural change for last period?
cusum test but only for current period, in general cusum is better done with recursive ols check other references again for this, there was one for non-recursive calculation of cusum (if I remember correctly)
- Greene 7.4.4: with unequal variances Greene mentions Wald test, but where size of test might not be very good no mention of F-test based on GLS, is there a reference for what I did? alternative: use Wald test with bootstrap pvalues?
Created on Sat Mar 27 01:48:01 2010 Author: josef-pktd
6.7.6.3. Classes¶
OLS (endog[, exog, missing, hasconst]) |
A simple ordinary least squares model. |
OneWayLS (y, x[, groups, het, data, meta]) |
Class to test equality of regression coefficients across groups |
WLS (endog, exog[, weights, missing, hasconst]) |
A regression model with diagonal but non-identity covariance structure. |