I'm doing a binary logistic regression in Stata 15.0, but my supervisor told me you cannot interpret the coefficient of just the regression. Therefore he told me to use marginal effects using margins. Then I can also plot the marginal effects for the interaction effect. I use this command to regress, but I'm not sure if I should use the command logistic (this one gives odds ratios) or logit (coefficients):
Without moderator effect:
logit entrepreneur gender genderinequality_index LED_1 LED_2 age age_squared hhinc_lowest hhinc_middle hhsize education_none education_somesecondary education_secondary education_postsec
With moderator effect:
logit entrepreneur gender genderinequality_index LED_1 LED_2 age age_squared hhinc_lowest hhinc_middle hhsize education_none education_somesecondary education_secondary education_postsec gender*genderinequality
After this, I use the following command to get the margins (used the Stata manual):
margins entrepreneur gender genderinequality_index LED_1 LED_2 age age_squared hhinc_lowest hhinc_middle hhsize education_none education_somesecondary education_secondary education_postsec, post
And I get this error:
genderinequality_index: factor variables may not contain noninteger values
However, the minimum of this variable is 0.58, so I don't get how this is a noninteger value?
Another question is: should I include all control variables in the margins effect or just dependent, independent and moderator? Also, does the marginal effect help analyse only the interaction term, or all the variables?
If the margins command works out, after your help maybe

I hope my questions are clear and someone can help me out! Would be much appreciated!
Kind regards,
Josephine
0 Response to Marginal effects command doesn't work. Don't understand error: factor variables may not contain noninteger values
Post a Comment