Dear Stata community,
I want to estimate the effects of a few climate variables on weekly child labor hours from an unbalanced panel. I have sample selection because the decision to send children to work at all (the extensive margin) selects some children into work with non-zero hours (the intensive margin) and sets working hours to zero for many others.
Because climate variables often have nonlinear effects on socioeconomic phenomena, I use b-splines to allow for functional flexibility. This is implemented through the command bspline (ssc install bspline).
Since I would like to control for unobserved and time-invariant heterogeneity, I am using the xtheckmanfe command (ssc install xtheckmanfe) by FernandoRios, which implements the correlated random effects model, proposed in 1995 by Jeff Wooldridge. Unfortunately, I run into convergence issues. I have made sure that all variables are re-scaled properly. The command runs for what feels like forever and then throws the error "convergence not achieved" - that's return code r(430).
Here is the relevant section...
I know that this could be caused by a whole host of different issues. Still, any guidance you can offer would be highly appreciated - also any alternative solutions you may know. Thanks!
I want to estimate the effects of a few climate variables on weekly child labor hours from an unbalanced panel. I have sample selection because the decision to send children to work at all (the extensive margin) selects some children into work with non-zero hours (the intensive margin) and sets working hours to zero for many others.
Because climate variables often have nonlinear effects on socioeconomic phenomena, I use b-splines to allow for functional flexibility. This is implemented through the command bspline (ssc install bspline).
Since I would like to control for unobserved and time-invariant heterogeneity, I am using the xtheckmanfe command (ssc install xtheckmanfe) by FernandoRios, which implements the correlated random effects model, proposed in 1995 by Jeff Wooldridge. Unfortunately, I run into convergence issues. I have made sure that all variables are re-scaled properly. The command runs for what feels like forever and then throws the error "convergence not achieved" - that's return code r(430).
Here is the relevant section...
Code:
* create cubic b-splines for climate vars * ssc install bspline bspline, x(wet) power(3) gen(bs_wet) bspline, x(pre) power(3) gen(bs_pre) bspline, x(tmp) power(3) gen(bs_tmp) bspline, x(tmx) power(3) gen(bs_tmx) bspline, x(tmn) power(3) gen(bs_tmn) *set analysis variables global Y childworkchores global C bs_wet* bs_pre* bs_tmp* bs_tmx* bs_tmn* bs_tmx* global X age age_squared sex MPI log_totcons sector * declare panel data xtset uniqueid t * Run xtheckmanfe...THIS IS WHERE THINGS GO WRONG xtheckmanfe $Y $C $X, select(selection = $C $X hhsize)
Comment