Dear Stata Forum,
I would like to estimate the following equation simplified for illustration purposes:
Then I would like to determine the marginal effect for wellbeing evaluated at the mean.
However, IV regression in Stata does not allow for something like the following, which is needed for the margins command:
Question:
How can I evaluate the marginal effect of wellbeing?
I would appreciate your help and suggestions.
Thanks,
Nico
Here is a data example:
I would like to estimate the following equation simplified for illustration purposes:
Code:
xtivreg2 logrhw (c.wellbeing c.wellbeing2=c.depress c.depress_2), fe
However, IV regression in Stata does not allow for something like the following, which is needed for the margins command:
Code:
c.wellbeing##c.wellbeing=c.depress##c.depress
How can I evaluate the marginal effect of wellbeing?
I would appreciate your help and suggestions.
Thanks,
Nico
Here is a data example:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(logrhw wellbeing wellbeing2 depress depress_2) . . . . . . . . . . . . . . . . . . . . . . . . . . 19 361 2 4 1.8524344 . . . . 1.6607 . . . . 1.9543204 30 900 5 25 1.487605 27 729 5 25 2.181253 30 900 5 25 1.304421 30 900 5 25 1.652883 28 784 5 25 1.2391038 30 900 5 25 . 2 4 1 1 . 15 225 1 1 . 5 25 1 1 . 12 144 2 4 . 6 36 2 4 . 2 4 1 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.129325 23 529 3 9 2.300225 27 729 3 9 2.1090636 27 729 4 16 2.749251 30 900 5 25 . 22 484 2 4 2.392943 29 841 4 16 . . . . . 2.244474 11 121 3 9 2.0936341 17 289 2 4 2.760113 30 900 5 25 2.0467763 25 625 3 9 . 15 225 3 9 2.4479344 26 676 3 9 . . . . . . . . . . . . . . . .9266297 34 1156 4 16 . 29 841 5 25 2.0941942 24 576 5 25 2.0135913 26 676 5 25 1.9088397 29 841 5 25 1.9175254 25 625 5 25 . . . . . . 22 484 4 16 2.423204 31 961 5 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 676 5 25 . 26 676 4 16 . 26 676 4 16 . . . . . . . . . . . . . . . . 17 289 3 9 . 25 625 2 4 . . . . . . . . . . . 29 841 4 16 2.610395 27 729 5 25 2.6780224 25 625 4 16 2.86767 33 1089 5 25 2.0818703 26 676 5 25 . 26 676 4 16 . 26 676 5 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.514734 25 625 5 25 . . . . . 2.8272696 9 81 3 9 2.831384 17 289 3 9 3.073519 8 64 2 4 3.0846524 28 784 4 16 3.109363 15 225 3 9 3.1362605 2 4 2 4 3.1790135 16 256 4 16 3.225305 24 576 4 16 3.3197315 26 676 4 16 3.2494724 23 529 3 9 2.6127515 30 900 5 25 2.630744 31 961 5 25 end
Comment