Mansi:
you may want to take a look at https://blog.stata.com/2011/08/22/us...tell-a-friend/
you may want to take a look at https://blog.stata.com/2011/08/22/us...tell-a-friend/
xtpoisson y x1 x2 ... xK, fe vce(robust) predict xbhat, xb gen xbhatsq = xbhat^2 gen xbhatcu = xbhat^3 xtpoisson y x1 x2 ... xK xbhatsq xbhatcu, fe vce(robust) test xbhatsq xbhatcu
use http://fmwww.bc.edu/ec-p/data/wooldridge/wage2.dta qui poisson wage educ exper tenure, r predict fit, xb g fit2=(fit)^2 g fit3=(fit)^3 qui poisson wage educ exper tenure fit2 fit3, r test fit2 fit3 * One of the powers is incorrectly dropped * The problem is solved by centring the fitted values su fit, meanonly g c_fit2=(fit-r(mean))^2 g c_fit3=(fit-r(mean))^3 qui poisson wage educ exper tenure c_fit2 c_fit3, r test c_fit2 c_fit3
Comment