Predicted Probability after Logit (...), fe

#1
Predicted Probability after xtlogit (...), fe

Hi!

I ran a logistic regression (i.e. my dependent variable y is binary) with fixed-effects. Among a set of covariates z, my variable of central interest, x, is also binary (0/1) and shows a positive significant coefficient. [xtlogit y x covariates, fe]

I would now like to compute the predicted probability - that is the probability that y=1 when x=1 exceeds y=1 if x=0.
Pr(y=1)|z, x=1)/Pr(y=1|,z,x=0) -1 = pred. Prob.

I've come across that expression quite often recently, but I have no idea how the postestimation commands in stata can help me find that predicted probabitliy. Is there any way to do it with margins, keeping the other variables at their means?

Thanks for your help in advance!!
 
Last edited:

hlsmith

Less is more. Stay pure. Stay poor.
#2
I don't use STATA, but most programs allow you to do this. Worst case scenario you can usually calculate it be hand. By margins, do you mean 95% confidence intervals?

\( p = e(beta coefficients) / 1 + e(beta coefficients) \)

Can better explain if you go this route, but probably won't have to.
 

bukharin

RoboStataRaptor
#4
Since x is a categorical variable you should model it as such:
xtlogit y x covariates, fe
should be:
xtlogit y i.x covariates, fe

Now you can use:
margins x