Введение
Статистический тест
In statistics, the Breusch–Pagan test, developed in 1979 by Trevor Breusch and Adrian Pagan, is used to test for heteroskedasticity in a linear regression model. It was independently suggested with some extension by R. Dennis Cook and Sanford Weisberg in 1983 (Cook–Weisberg test). Derived from the Lagrange multiplier test principle, it tests whether the variance of the errors from a regression is dependent on the values of the independent variables. In that case, heteroskedasticity is present. Suppose that we estimate the regression model
and obtain from this fitted model a set of values for , the residuals. Ordinary least squares constrains these so that their mean is 0 and so, given the assumption that their variance does not depend on the independent variables, an estimate of this variance can be obtained from the average of the squared values of the residuals. If the assumption is not held to be true, a simple model might be that the variance is linearly related to independent variables. Such a model can be examined by regressing the squared residuals on the independent variables, using an auxiliary regression equation of the form
This is the basis of the Breusch–Pagan test. It is a chi squared test: the test statistic is distributed nχ2 with k degrees of freedom. If the test statistic has a p value below an appropriate threshold (e. g. p < 0.05) then the null hypothesis of homoskedasticity is rejected and heteroskedasticity assumed. If the Breusch–Pagan test shows that there is conditional heteroskedasticity, one could either use weighted least squares (if the source of heteroskedasticity is known) or use heteroscedasticity consistent standard errors.
В статистике тест Брюша — Пагана, разработанный в 1979 году Тревором Брюшем и Адрианом Паганом, используется для проверки наличия гетероскедастичности в модели линейной регрессии. Он был независимо предложен с некоторыми дополнениями Р. Деннисом Куком и Санфордом Вайсбергом в 1983 году (тест Кука — Вайсберга). Основанный на принципе теста множителя Лагранжа, он проверяет, зависит ли дисперсия ошибок регрессии от значений независимых переменных. В этом случае присутствует гетероскедастичность. Предположим, что мы оцениваем модель регрессии и получаем из этой подогнанной модели набор значений для , остатков. Метод наименьших квадратов ограничивает их так, что их среднее значение равно 0, и, следовательно, при условии, что их дисперсия не зависит от независимых переменных, оценку этой дисперсии можно получить как среднее значение квадратов остатков. Если это предположение не выполняется, простая модель может заключаться в том, что дисперсия линейно связана с независимыми переменными. Эту модель можно исследовать, регрессируя квадраты остатков на независимые переменные, используя вспомогательное регрессионное уравнение вида
In statistics, the Breusch–Pagan test, developed in 1979 by Trevor Breusch and Adrian Pagan, is used to test for heteroskedasticity in a linear regression model. It was independently suggested with some extension by R. Dennis Cook and Sanford Weisberg in 1983 (Cook–Weisberg test). Derived from the Lagrange multiplier test principle, it tests whether the variance of the errors from a regression is dependent on the values of the independent variables. In that case, heteroskedasticity is present. Suppose that we estimate the regression model
and obtain from this fitted model a set of values for , the residuals. Ordinary least squares constrains these so that their mean is 0 and so, given the assumption that their variance does not depend on the independent variables, an estimate of this variance can be obtained from the average of the squared values of the residuals. If the assumption is not held to be true, a simple model might be that the variance is linearly related to independent variables. Such a model can be examined by regressing the squared residuals on the independent variables, using an auxiliary regression equation of the form
This is the basis of the Breusch–Pagan test. It is a chi squared test: the test statistic is distributed nχ2 with k degrees of freedom. If the test statistic has a p value below an appropriate threshold (e. g. p < 0.05) then the null hypothesis of homoskedasticity is rejected and heteroskedasticity assumed. If the Breusch–Pagan test shows that there is conditional heteroskedasticity, one could either use weighted least squares (if the source of heteroskedasticity is known) or use heteroscedasticity consistent standard errors.
Это является основой теста Брюша — Пагана. Это хи-квадрат тест: статистика теста распределена как nχ2 со k степенями свободы. Если p-значение статистики теста ниже соответствующего порогового значения (например, p < 0,05), то нулевая гипотеза о гомоскедастичности отвергается и принимается наличие гетероскедастичности. Если тест Брюша — Пагана показывает наличие условной гетероскедастичности, можно использовать либо взвешенный метод наименьших квадратов (если известен источник гетероскедастичности), либо использовать робастные стандартные ошибки, устойчивые к гетероскедастичности.
In statistics, the Breusch–Pagan test, developed in 1979 by Trevor Breusch and Adrian Pagan, is used to test for heteroskedasticity in a linear regression model. It was independently suggested with some extension by R. Dennis Cook and Sanford Weisberg in 1983 (Cook–Weisberg test). Derived from the Lagrange multiplier test principle, it tests whether the variance of the errors from a regression is dependent on the values of the independent variables. In that case, heteroskedasticity is present. Suppose that we estimate the regression model
and obtain from this fitted model a set of values for , the residuals. Ordinary least squares constrains these so that their mean is 0 and so, given the assumption that their variance does not depend on the independent variables, an estimate of this variance can be obtained from the average of the squared values of the residuals. If the assumption is not held to be true, a simple model might be that the variance is linearly related to independent variables. Such a model can be examined by regressing the squared residuals on the independent variables, using an auxiliary regression equation of the form
This is the basis of the Breusch–Pagan test. It is a chi squared test: the test statistic is distributed nχ2 with k degrees of freedom. If the test statistic has a p value below an appropriate threshold (e. g. p < 0.05) then the null hypothesis of homoskedasticity is rejected and heteroskedasticity assumed. If the Breusch–Pagan test shows that there is conditional heteroskedasticity, one could either use weighted least squares (if the source of heteroskedasticity is known) or use heteroscedasticity consistent standard errors.
Устойчивый вариант
Вариант этого теста, устойчивый к не-гауссовскому члену ошибки, был предложен Роджером Кёнкером. В этом варианте зависимая переменная во вспомогательной регрессии представляет собой квадрат остатка от регрессии первого шага, а тестовая статистика – это значение из вспомогательной регрессии. Как отмечает Кёнкер (1981, стр. 111), хотя пересмотренная статистика имеет корректный асимптотический уровень значимости, её мощность "может быть весьма низкой, за исключением идеальных гауссовских условий".
Программное обеспечение
В R этот тест выполняется функцией ncvTest из пакета car, функцией bptest из пакета lmtest, функцией plmtest из пакета plm или функцией breusch pagan из пакета skedastic. В Stata необходимо указать полную регрессию, а затем ввести команду estat hettest, после которой перечисляются все независимые переменные. В SAS тест Бройша-Пагана можно получить с помощью опции Proc Model. В Python тест Бройша-Пагана доступен как метод het_breuschpagan в statsmodels.stats.diagnostic (пакет statsmodels). В gretl после регрессии МНК можно применить команду modtest breusch pagan.