Usually -margins- is the best way of doing this. You don't need to force the other dummies to be zero, although you can if that's desirable.
Here is a simple example based on the first example from -help logit-:
Code:* example dataset - low birth weight webuse lbw * logistic regression of low birth weight; predictors are age (continuous), race (categorical) * and smoking during pregnancy (binary) logistic low age i.race smoke * what is the predicted probability of low birth weight (adjusted for age and smoking) * in each racial group? margins race * what is the average marginal effect of races 2 and 3 vs 1? margins, dydx(race) * what about in smokers vs non-smokers? margins race, at(smoke=(0 1)) * example of a more complicated model with an interaction between age and race logistic low c.age##i.race smoke * to understand the interaction it's usually easiest to graph it levelsof age, local(ages) margins race, at(age=(`ages')) marginsplot, noci




Reply With Quote
