Hi,
I am stata beginner and running logit regressions. I am trying to compare the predicted probabilities for the average individual for two different specifications. I want to compute the % change in predicted probabilities for the average individual when I use different specifications. However, I have not been able to find a good way of doing so.
So far this is what I have done.
I first run a logit regression. I can calculate the predicted probabilities for the whole sample and take the mean for both specifications.
sysuse auto, clear logit foreign price mpg rep78 predict pa, pr su pa logit foreign price mpg predict pb, pr su pb gen a = (p1-p2)/p1 I can calculate the % change and take the mean, but this is not what I want. Instead, I want something equivalent to a "atmeans" option for the predict command. Based on https://www3.nd.edu/~rwilliam/stats/Margins01.pdf,
I think I want to estimate Adjusted Predictions at Representative Values. So I use
margins rep78, atmeans
which generates an error because rep78 is not a factor variable.
Is there an alternative for continuous variables?
To be perfectly clear, I want the following
logit(b0 + b1*(price at mean) + b2*(mpg at mean) + b3*(rep78 at mean))
and
logit(b0 + b1*(price at mean) + b2*(mpg at mean))
Thank you.
Elliot
***** I found the solution
I can simply run
margins, atmeans
for both specifications and calculate the % change.
I am stata beginner and running logit regressions. I am trying to compare the predicted probabilities for the average individual for two different specifications. I want to compute the % change in predicted probabilities for the average individual when I use different specifications. However, I have not been able to find a good way of doing so.
So far this is what I have done.
I first run a logit regression. I can calculate the predicted probabilities for the whole sample and take the mean for both specifications.
sysuse auto, clear logit foreign price mpg rep78 predict pa, pr su pa logit foreign price mpg predict pb, pr su pb gen a = (p1-p2)/p1 I can calculate the % change and take the mean, but this is not what I want. Instead, I want something equivalent to a "atmeans" option for the predict command. Based on https://www3.nd.edu/~rwilliam/stats/Margins01.pdf,
I think I want to estimate Adjusted Predictions at Representative Values. So I use
margins rep78, atmeans
which generates an error because rep78 is not a factor variable.
Is there an alternative for continuous variables?
To be perfectly clear, I want the following
logit(b0 + b1*(price at mean) + b2*(mpg at mean) + b3*(rep78 at mean))
and
logit(b0 + b1*(price at mean) + b2*(mpg at mean))
Thank you.
Elliot
***** I found the solution
I can simply run
margins, atmeans
for both specifications and calculate the % change.
Comment