Hi!
I’m currently writing my undergraduate thesis to determine the effect of the rice reform on the share of rice in total household expenditure (N=476,014; cross-section dataset). I am using Stata 18.5.
My dependent variable (DV) is a proportion with min = 0 at max = 0.9, where the share of rice = total rice expenditure/total expenditure of the household. I am interacting the i.year2021 and i.year2023, which is the proxy to the period after the rice reform was implemented, to all my control variables to see its effect on the household.
My code is
When I run
, Stata returns “not estimable” and only produces the margins for the values from i.job to i.region. I tried the following codes to get the margins:
After running the latest code, Stata returns this:
My questions are:
1) Is there any workaround so I can obtain the average marginal effects of the interaction terms?
2) In the worst case scenario, are there any methods I can look at that can provide robust and reliable results, given that my DV is a proportion?
Thank you very much!
I’m currently writing my undergraduate thesis to determine the effect of the rice reform on the share of rice in total household expenditure (N=476,014; cross-section dataset). I am using Stata 18.5.
My dependent variable (DV) is a proportion with min = 0 at max = 0.9, where the share of rice = total rice expenditure/total expenditure of the household. I am interacting the i.year2021 and i.year2023, which is the proxy to the period after the rice reform was implemented, to all my control variables to see its effect on the household.
My code is
Code:
fracreg logit riceshare_real i.year2021 i.year2023 i.job c.toinc_real c.toinc_real_sq c.male_hh c.youngchild_hh c.child_hh c.youngold_hh c.adult_hh i.urb i.region i.year2021#(i.job c.toinc_real c.toinc_real_sq c.male_hh c.youngchild_hh c.child_hh c.youngold_hh c.adult_hh i.urb i.region) i.year2023#(i.job c.toinc_real c.toinc_real_sq c.male_hh c.youngchild_hh c.child_hh c.youngold_hh c.adult_hh i.urb i.region) i.year2021##(i.urb i.region) i.year2023##(i.urb i.region), vce(robust)
Code:
margins, dydx(*) at means
Code:
margins, dydx(*) atmeans
Code:
margins r.year2021#r.job, dydx(*) atmeans
Code:
margins year2021 year2023, atmeans
Code:
margins, dydx(year2021 year2023) atmeans
Code:
margins i.year2021 i.year2023, dydx(*) atmeans
Code:
margins year2021 job i.year2021#i.job, atmeans
Code:
Adjusted predictions Number of obs = 476,014 Model VCE: Robust Expression: Conditional mean of riceshare_real, predict() At: 0.year2021 = .6533106 (mean) 1.year2021 = .3466894 (mean) 0.year2023 = .6570101 (mean) 1.year2023 = .3429899 (mean) 0.job = .2028281 (mean) 1.job = .7971719 (mean) toinc_real = 278742.9 (mean) toinc_real_sq = 2.07e+11 (mean) male_hh = 2.197564 (mean) youngchild_hh = .4052675 (mean) child_hh = .8423303 (mean) youngold_hh = .7883508 (mean) adult_hh = 2.223645 (mean) 0.urb = .5315432 (mean) 1.urb = .4684568 (mean) 1.region = .0382909 (mean) 2.region = .0418412 (mean) 3.region = .0801867 (mean) 4.region = .0499649 (mean) 5.region = .0544942 (mean) 6.region = .0693236 (mean) 7.region = .05574 (mean) 8.region = .0635927 (mean) 9.region = .0406543 (mean) 10.region = .0601306 (mean) 11.region = .0560152 (mean) 12.region = .047965 (mean) 13.region = .1267946 (mean) 14.region = .0569479 (mean) 15.region = .0544774 (mean) 16.region = .0489439 (mean) 17.region = .054637 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- year2021 | 0 | . (not estimable) 1 | . (not estimable) | job | 0 | .111228 .0001953 569.67 0.000 .1108453 .1116107 1 | .1160284 .0000967 1199.81 0.000 .1158389 .116218 | year2021#job | 0 0 | . (not estimable) 0 1 | . (not estimable) 1 0 | . (not estimable) 1 1 | . (not estimable) ------------------------------------------------------------------------------
1) Is there any workaround so I can obtain the average marginal effects of the interaction terms?
2) In the worst case scenario, are there any methods I can look at that can provide robust and reliable results, given that my DV is a proportion?
Thank you very much!
Comment