Hey everyone!

I am currently trying to perform a Hausman test to decide whether to perform a Random effects or a Fixed effects regression. I am following the following steps in order to carry out the test:
1) xtreg y1 y2 x1 x2 x3 i.id i.year, fe
2) estimates store fe
3) xtreg y1 y2 x1 x2 x3 i.id i.year, re
4)estimates store re
5) Hausman fe re

This test gives me a p-value of 0.000 and so the result is that the null hypothesis (H0: RE model is appropriate) is rejected, meaning that I should use FE. However, as you can see I use multiple levels of fixed effects (i.id and i.year) and so I also used reghdfe instead of xtreg in the first step. Furthermore, I do not believe that you can use reghdfe for random effects and so the rest of the steps stay the same. In this case, the p-value I get is 0.1853, meaning that the null hypothesis cannot be rejected and so i should use RE. Therefore, I am wondering whether I should use xtreg or reghdfe when doing that first step as they give me contradictory results.

Any help would be greatly appreciated! Thank you in advance!