Hello everybody!
I am using Stata 16 and estimating the panel logit model.
I'm having problems in order to obtain marginal effects after xtlogit fixed effects. The problem is that the missing predicted values are encountered within the estimation sample (error 322).
For the estimation I use the command:
xtset year indiv
xtlogit switcher1 noleg numbernewp coalition i. year i.region i.council2 i.parties province_capital gender i.partiesformuni low_gdp medium_gdp unemployment if party_muni> 3, i (indiv) fe nolog
however after running the command:
margins, dydx (*) predict (pu0)
Stata returns the error:
missing predicted values found within estimation sample (322)
When I remove the categorical variable parties, everything works, both the regression and the subsequent marginal effects! In fact, I note that some missing predicted values are generated with respect this variable. But I think it's necessary to include this regresor in order to control the estimation.
How can I fix this problem? Is it necessary to impose a condition that defines calculating marginal effects limited to those observations that do not generate missing values? Or do I solve the problem of missing values directly and previously in my original model?
I really appreciate if someone could help me!
I am using Stata 16 and estimating the panel logit model.
I'm having problems in order to obtain marginal effects after xtlogit fixed effects. The problem is that the missing predicted values are encountered within the estimation sample (error 322).
For the estimation I use the command:
xtset year indiv
xtlogit switcher1 noleg numbernewp coalition i. year i.region i.council2 i.parties province_capital gender i.partiesformuni low_gdp medium_gdp unemployment if party_muni> 3, i (indiv) fe nolog
however after running the command:
margins, dydx (*) predict (pu0)
Stata returns the error:
missing predicted values found within estimation sample (322)
When I remove the categorical variable parties, everything works, both the regression and the subsequent marginal effects! In fact, I note that some missing predicted values are generated with respect this variable. But I think it's necessary to include this regresor in order to control the estimation.
How can I fix this problem? Is it necessary to impose a condition that defines calculating marginal effects limited to those observations that do not generate missing values? Or do I solve the problem of missing values directly and previously in my original model?
I really appreciate if someone could help me!
Comment