Hello all,
I am doing an IV estimation with a count dependent variable and two endogenous variables, one of which is an interaction term. I want to conduct a marginal analysis using the command
after my estimation.
Thus far, I have been able to accomplish this using the ivregress command with the following lines of code:
Since the outcome variable is a count variable, however, I want to be able to use an IV poisson specification to accomplish this as well. Specifically, I want to be able to run the following code:
Unfortunately, when I do so I receive the following error message:
Now, I would be more than happy to generate the endogenous interaction term by hand and run ivpoisson. However, I want to conduct a marginal analysis of "fined" by different values of "hh_cons_total_DT_07" and I do not think that I can do that using the margins command unless I use the factor variable notation. Are there any suggestions for getting around this?
Thank you!
I am doing an IV estimation with a count dependent variable and two endogenous variables, one of which is an interaction term. I want to conduct a marginal analysis using the command
Code:
margins
Thus far, I have been able to accomplish this using the ivregress command with the following lines of code:
Code:
ivregress 2sls days_missed_09 treatedHH carer_score_max carer_score_max2 /// total_chronically_ill hh_sex_07 hh_wage_emp days_missed_07 hh_cons_total_DT_07 /// own_livestock hh_agland_acres_07 rural hh_size_07 ( i.fined i.fined#c.hh_cons_total_DT_07 /// = i.conditions i.conditions#c.hh_cons_total_DT_07 ), vce(cluster district) margins, dydx(fined) at(hh_cons_total_DT_07=(.669 .948 1.405 1.952 2.772)) vsquish
Code:
ivpoisson cfunc days_missed_09 treatedHH carer_score_max carer_score_max2 /// total_chronically_ill hh_sex_07 hh_wage_emp days_missed_07 hh_cons_total_DT_07 /// own_livestock hh_agland_acres_07 rural hh_size_07 ( i.fined i.fined#c.hh_cons_total_DT_07 /// = i.conditions i.conditions#c.hh_cons_total_DT_07 ), vce(cluster district) margins, dydx(fined) at(hh_cons_total_DT_07=(.669 .948 1.405 1.952 2.772)) vsquish
Code:
endogenous regressors cannot be factor variables r(198);
Thank you!
Comment