Hello everyone!
I am fairly new to STATA, just started a couple of months ago according to the curriculum of my graduate degree for labor market economics. One thing that I am revising right now and I cannot find anywhere (probably due to lack of experience) is how to get the marginal effect of a variable out of a linear regression.
I will try to be more detailed:
The dataset is about information on flight prices and distances and so on. After performing a regression on the model
(reg log(passengers) fare distance distance_squared market_concentration)
I get my output as expected.
What I want to get next though is the marginal effect of distance at means.
The way I tried to go about it was either:
margins (dydx) dist, atmeans --- which did not work because this is not supposed to be used for a linear regression as far as I take it, and
after regressing the same model but with i.distance I tried to do margins again but I did not get anything.
My problem is not calculating the numerical value of the effect, since I can do that with math, but I want to be able to do it in STATA and for that I have not found a way yet. Could someone please help me out?
Thank you in advance.
I am fairly new to STATA, just started a couple of months ago according to the curriculum of my graduate degree for labor market economics. One thing that I am revising right now and I cannot find anywhere (probably due to lack of experience) is how to get the marginal effect of a variable out of a linear regression.
I will try to be more detailed:
The dataset is about information on flight prices and distances and so on. After performing a regression on the model
(reg log(passengers) fare distance distance_squared market_concentration)
I get my output as expected.
What I want to get next though is the marginal effect of distance at means.
The way I tried to go about it was either:
margins (dydx) dist, atmeans --- which did not work because this is not supposed to be used for a linear regression as far as I take it, and
after regressing the same model but with i.distance I tried to do margins again but I did not get anything.
My problem is not calculating the numerical value of the effect, since I can do that with math, but I want to be able to do it in STATA and for that I have not found a way yet. Could someone please help me out?
Thank you in advance.
Comment