Name
bpagan0 — Breusch and Pagan heteroskedasticity test
CALLING SEQUENCE
[nvar2,f,f_pvalue,r2]=bpagan0(u2,x2,nvar)
PARAMETERS
- Input
u2 = the first stage regression squared residuals
x2 = the exogenous variables of the Breusch and Pagan second stage regression
nvar = number of exogenous variables in the first satge regression
- Output
nvar2 = # of exogenous variables of the Breusch and Pagan second stage regression
f = value of the Goldfeld-Quandt F test
f_pvalue = its p-value
r2 = Rª of the auxilliary regression
DESCRIPTION
Computes Breusch and Pagan heteroskedasticity test with the exogenous second stage variables provided by the user (see Breusch, T.S. and A.R. Pagan (1979): "A simple test for heteroscedasticity and random coefficient variation", Econometrica 47, 1287-1294). Results are given only in constant form and not printed.
EXAMPLE
[nvar2,f,f_pvalue]=bpagan0(u2,x2,nvar)
// Example taken from function bpagan. Useful mainly for programming purpose (since bkw does much more).