Hi everyone,
I want to conduct a Breusch-Pagan test for het in panel data. so I used the following
xtivreg y x1 x2 (x1=z1 z2), fe
predict ehat, e
gen ehat2=ehat*ehat
predict yhat, xb
now I want to regress ehat2 on yhat
what should I use in this step?? xtreg ehat2 yhat, be
or
reg ehat2 yhat
or
xtreg ehat2 yhat, fe
then I used
scalar LM=e(r2)*e(N)
scalar pvalue=chi2tail(edf_m),LM)
I obtained 2 different LM tests
which method is LM test is the correct?
Thanks
I want to conduct a Breusch-Pagan test for het in panel data. so I used the following
xtivreg y x1 x2 (x1=z1 z2), fe
predict ehat, e
gen ehat2=ehat*ehat
predict yhat, xb
now I want to regress ehat2 on yhat
what should I use in this step?? xtreg ehat2 yhat, be
or
reg ehat2 yhat
or
xtreg ehat2 yhat, fe
then I used
scalar LM=e(r2)*e(N)
scalar pvalue=chi2tail(edf_m),LM)
I obtained 2 different LM tests
which method is LM test is the correct?
Thanks