I'm running a two stage residual inclusion, and evaluating some average marginal effects post estimation and running into an issue of extremely large estimates following the Margins dy/dx command. I'm hoping this is a simple user error that I'm struggling to spot as a relatively naive stata user.


Other very similar models on the same data set just adding in additional covariates yield very different and more reasonable results in a scale that makes sense. Any insight as to why these marginal effects are so extremely large?
For reference, essentially the same model but including a few more clinical covariates of interest yield results that are more reasonable.

Code:
*MODEL 3 *************************************************/ glm all_opioid_sum ib0.female ib1.race ib2.ethnicity_num ib0.insurance ib0.dx_premature ib0.px_chd ib0.nonnecabd ib0.mednec ib0.surgnec ib0.dx_vlbw ib0.dx_elbw ib0.dx_hie ib0.ecmo move_avg_1year, family(gamma) link(log) vce(cluster hospital_number) /************************************************* ** Save the first stage residuals. ** *************************************************/ predict Xuhat3, response /************************************************* ** Apply GLM for the 2SRI second stage. ** *************************************************/ glm infla_total_suc all_opioid_sum ib0.female ib1.race ib2.ethnicity_num ib0.insurance ib0.dx_premature ib0.px_chd ib0.nonnecabd ib0.mednec ib0.surgnec ib0.dx_vlbw ib0.dx_elbw ib0.dx_hie ib0.ecmo Xuhat3, family(gamma) link(log) vce(bootstrap, reps(50) cluster(hospital_number) bca) margins, dydx(*)
Other very similar models on the same data set just adding in additional covariates yield very different and more reasonable results in a scale that makes sense. Any insight as to why these marginal effects are so extremely large?
For reference, essentially the same model but including a few more clinical covariates of interest yield results that are more reasonable.
Comment