Testing for heteroskedasticity in panel data vs time series? I watched this video on how to check for heteroskedasticity using Stata, and it helped me a lot. But the data example in the video was time series data.

He used the Bruesh-Pagan test. 

hettest dependntvar1 dependvar2 dependvar3 ... dv6


And the output was like

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity 
     Ho: Constant variance
     Variables: dependntvar1 dependvar2 dependvar3 ... dv6

     chi2(6)     =  86.56
     Prob &gt; chi2  =   0.0000


The Ho had a p-value of 0.0000 so it had heteroskedasticity.

Does it work the same for panel data? 

If not, how do I test for heteroskedasticity on panel data?
You can regress residual squares (from RE or FE depending on your estimation) on $X_{it} \hat\beta$ and its square using the clustered standard errors (the vce(cl id) option), and read the F statistic and the associated p value. This is basically the same as Het test for cross sectional models (White's simplified test).

xtreg y x1 x2, re
predict uhat, ue
predict xb, xb
gen uhatsq = uhat^2
reg uhatsq c.xb##c.xb, vce(cl id)
testparm c.xb##c.xb


Another test is for groupwise heteroskedasticity proposed by Greene (2000). This test assumes that the variance of the error term is $\sigma_i^2$ (no heteroskedasticity over $t$) and then test whether $\sigma_i^2$ is the same for all $i$. You can do it using the xttest3 module. The xttest3 manual says: 


  In terms of small sample properties, simulations of the test statistic have shown that its power is very low in the context of fixed effects with "large N, small T" panels. In that circumstance, the test should be used with caution.