<s>
In	O
statistics	O
,	O
the	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
,	O
developed	O
in	O
1979	O
by	O
Trevor	O
Breusch	O
and	O
Adrian	O
Pagan	O
,	O
is	O
used	O
to	O
test	O
for	O
heteroskedasticity	B-General_Concept
in	O
a	O
linear	B-General_Concept
regression	I-General_Concept
model	I-General_Concept
.	O
</s>
<s>
It	O
was	O
independently	O
suggested	O
with	O
some	O
extension	O
by	O
R	B-Language
.	O
Dennis	O
Cook	O
and	O
Sanford	O
Weisberg	O
in	O
1983	O
(	O
Cook	B-General_Concept
–	I-General_Concept
Weisberg	I-General_Concept
test	I-General_Concept
)	O
.	O
</s>
<s>
Derived	O
from	O
the	O
Lagrange	B-General_Concept
multiplier	I-General_Concept
test	I-General_Concept
principle	O
,	O
it	O
tests	O
whether	O
the	O
variance	O
of	O
the	O
errors	O
from	O
a	O
regression	O
is	O
dependent	O
on	O
the	O
values	O
of	O
the	O
independent	O
variables	O
.	O
</s>
<s>
In	O
that	O
case	O
,	O
heteroskedasticity	B-General_Concept
is	O
present	O
.	O
</s>
<s>
Ordinary	B-General_Concept
least	I-General_Concept
squares	I-General_Concept
constrains	O
these	O
so	O
that	O
their	O
mean	O
is	O
0	O
and	O
so	O
,	O
given	O
the	O
assumption	O
that	O
their	O
variance	O
does	O
not	O
depend	O
on	O
the	O
independent	O
variables	O
,	O
an	O
estimate	O
of	O
this	O
variance	O
can	O
be	O
obtained	O
from	O
the	O
average	O
of	O
the	O
squared	O
values	O
of	O
the	O
residuals	O
.	O
</s>
<s>
This	O
is	O
the	O
basis	O
of	O
the	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
It	O
is	O
a	O
chi-squared	B-General_Concept
test	I-General_Concept
:	O
the	O
test	B-General_Concept
statistic	I-General_Concept
is	O
distributed	O
nχ2	O
with	O
k	O
degrees	O
of	O
freedom	O
.	O
</s>
<s>
If	O
the	O
test	B-General_Concept
statistic	I-General_Concept
has	O
a	O
p-value	O
below	O
an	O
appropriate	O
threshold	O
(	O
e.g.	O
</s>
<s>
p	O
<	O
0.05	O
)	O
then	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
of	O
homoskedasticity	B-General_Concept
is	O
rejected	O
and	O
heteroskedasticity	B-General_Concept
assumed	O
.	O
</s>
<s>
If	O
the	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
shows	O
that	O
there	O
is	O
conditional	O
heteroskedasticity	B-General_Concept
,	O
one	O
could	O
either	O
use	O
weighted	B-Algorithm
least	I-Algorithm
squares	I-Algorithm
(	O
if	O
the	O
source	O
of	O
heteroskedasticity	B-General_Concept
is	O
known	O
)	O
or	O
use	O
heteroscedasticity-consistent	O
standard	O
errors	O
.	O
</s>
<s>
Under	O
the	O
classical	O
assumptions	O
,	O
ordinary	B-General_Concept
least	I-General_Concept
squares	I-General_Concept
is	O
the	O
best	O
linear	O
unbiased	O
estimator	O
(	O
BLUE	O
)	O
,	O
i.e.	O
,	O
it	O
is	O
unbiased	O
and	O
efficient	O
.	O
</s>
<s>
It	O
remains	O
unbiased	O
under	O
heteroskedasticity	B-General_Concept
,	O
but	O
efficiency	O
is	O
lost	O
.	O
</s>
<s>
Before	O
deciding	O
upon	O
an	O
estimation	O
method	O
,	O
one	O
may	O
conduct	O
the	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
to	O
examine	O
the	O
presence	O
of	O
heteroskedasticity	B-General_Concept
.	O
</s>
<s>
The	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
is	O
based	O
on	O
models	O
of	O
the	O
type	O
for	O
the	O
variances	O
of	O
the	O
observations	O
where	O
explain	O
the	O
difference	O
in	O
the	O
variances	O
.	O
</s>
<s>
The	O
null	B-General_Concept
hypothesis	I-General_Concept
is	O
equivalent	O
to	O
the	O
parameter	O
restrictions	O
:	O
</s>
<s>
The	O
following	O
Lagrange	O
multiplier	O
(	O
LM	O
)	O
yields	O
the	O
test	B-General_Concept
statistic	I-General_Concept
for	O
the	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
:	O
</s>
<s>
Step	O
3	O
:	O
The	O
LM	B-General_Concept
test	I-General_Concept
statistic	O
is	O
then	O
half	O
of	O
the	O
explained	O
sum	O
of	O
squares	O
from	O
the	O
auxiliary	O
regression	O
in	O
Step	O
2	O
:	O
</s>
<s>
The	O
test	B-General_Concept
statistic	I-General_Concept
is	O
asymptotically	O
distributed	O
as	O
under	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
of	O
homoskedasticity	B-General_Concept
,	O
as	O
proved	O
by	O
Breusch	O
and	O
Pagan	O
in	O
their	O
1979	O
paper	O
.	O
</s>
<s>
A	O
variant	O
of	O
this	O
test	O
,	O
robust	O
in	O
the	O
case	O
of	O
a	O
non-Gaussian	O
error	O
term	O
,	O
was	O
proposed	O
by	O
Roger	O
Koenker	O
.	O
</s>
<s>
In	O
this	O
variant	O
,	O
the	O
dependent	O
variable	O
in	O
the	O
auxiliary	O
regression	O
is	O
just	O
the	O
squared	O
residual	O
from	O
the	O
Step	O
1	O
regression	O
,	O
,	O
and	O
the	O
test	B-General_Concept
statistic	I-General_Concept
is	O
from	O
the	O
auxiliary	O
regression	O
.	O
</s>
<s>
As	O
Koenker	O
notes	O
(	O
1981	O
,	O
page	O
111	O
)	O
,	O
while	O
the	O
revised	O
statistic	O
has	O
correct	O
asymptotic	O
size	O
its	O
power	B-General_Concept
"	O
may	O
be	O
quite	O
poor	O
except	O
under	O
idealized	O
Gaussian	B-Application
conditions.	O
"	O
</s>
<s>
In	O
R	B-Language
,	O
this	O
test	O
is	O
performed	O
by	O
the	O
function	O
ncvTest	O
available	O
in	O
the	O
car	O
package	O
,	O
the	O
function	O
bptest	O
available	O
in	O
the	O
lmtest	O
package	O
,	O
the	O
function	O
plmtest	O
available	O
in	O
the	O
plm	O
package	O
,	O
or	O
the	O
function	O
breusch_pagan	O
available	O
in	O
the	O
skedastic	O
package	O
.	O
</s>
<s>
In	O
Python	B-Language
,	O
there	O
is	O
a	O
method	O
het_breuschpagan	O
in	O
statsmodels.stats.diagnostic	O
(	O
the	O
statsmodels	O
package	O
)	O
for	O
Breusch	B-General_Concept
–	I-General_Concept
Pagan	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
In	O
gretl	B-Application
,	O
the	O
command	O
modtest	O
--breusch-pagan	O
can	O
be	O
applied	O
following	O
an	O
OLS	B-General_Concept
regression	I-General_Concept
.	O
</s>
