one question I had: when applying bootstrap to xtreg, do you need some options to differentiate that the same panel being sampled and should be treated as different panels in bootstrap?
I think that's correct, if you want to treat X as fixed, you have to bootstrap the residuals. Basically in you data, you have residual and predicted Y (or if you want, the X variables), and then bootstrap the data, construct new y using the residual plus the predicted Y (or if using X, compute X'beta). This is the same as regular bootstrap, the only difference is you need to construct the dependent variable, not bootstrap the dependent variable.