Breusch and Pagan heteroskedasticity test
[nvar2,f,f_pvalue,r2]=bpagan0(u2,x2,nvar)
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
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
[nvar2,f,f_pvalue]=bpagan0(u2,x2,nvar) // Example taken from function bpagan. Useful mainly for programming purpose (since bkw does much more).