Hello Statalist,
I have a problem with a model that I'm trying to estimate. I have estimated similar models with other samples but in this case, I do not know if there is something wrong with my code or is the data itself (sample size (?)) that does not allow me to get the marginal effects.
I attached the dataset. My independent variables of interest are ind1_exp and ind1_con. Always when ind1_exp takes a value different than 0 it is negative and ind1_con equals 0. When ind1_exp equals 0, ind1_con is higher than 0. In other words, ind1_exp and ind1_con are from the same variable but I created these two because I need to measure (separately) the effect when ind1 is negative and when ind1 is positive. Again, I've done this before with other variables and sample sizes and got the estimates, but in this case I'm not getting the marginal effects.
This is the code I use... always it says for marginal effects "not estimable"
Marginals always are "not estimable".
Thank you for helping me and giving me some advice or answer. I'm thinking that it is probably because of the sample size or I'm looping on an error and I cannot see it.
I have a problem with a model that I'm trying to estimate. I have estimated similar models with other samples but in this case, I do not know if there is something wrong with my code or is the data itself (sample size (?)) that does not allow me to get the marginal effects.
I attached the dataset. My independent variables of interest are ind1_exp and ind1_con. Always when ind1_exp takes a value different than 0 it is negative and ind1_con equals 0. When ind1_exp equals 0, ind1_con is higher than 0. In other words, ind1_exp and ind1_con are from the same variable but I created these two because I need to measure (separately) the effect when ind1 is negative and when ind1 is positive. Again, I've done this before with other variables and sample sizes and got the estimates, but in this case I'm not getting the marginal effects.
This is the code I use... always it says for marginal effects "not estimable"
Code:
xi: reg dep0 c.ind1_exp##c.ind1_cont##c.ind2_0##c.control1##c.control2 i.state i.year, vce (cl state) margins, dydx(ind1_exp) at(ind2_0=(-.2(0.005).2) control1(mean) control2(mean) ind1_cont=(0)) vsquish margins, dydx(ind1_cont) at(ind2_0=(-.2(0.005).2) control1(mean) control2(mean) ind1_exp=(0)) vsquish xi: reg dep1 c.ind1_exp##c.ind1_cont##c.ind2_1##c.control1##c.control2 i.state i.year, vce (cl state) margins, dydx(ind1_exp) at(ind2_1=(-.35(0.005).31) control1(mean) control2(mean) ind1_cont=(0)) vsquish margins, dydx(ind1_cont) at(ind2_1=(-.35(0.005).31) control1(mean) control2(mean) ind1_exp=(0)) vsquish
Thank you for helping me and giving me some advice or answer. I'm thinking that it is probably because of the sample size or I'm looping on an error and I cannot see it.
Comment