Marginal Effects
Moderators: EViews Gareth, EViews Moderator
Marginal Effects
Hi there,
I use a probit model and my dependent variable has two categories.
My question: Is there an easy way to calculate the marginal effects of my independent variables?
If you have an solution, please describe it as simple as possbile, since I'm not so familiar with all this technical stuff
Thanks,
micha
PS: I use Eviews 6
I use a probit model and my dependent variable has two categories.
My question: Is there an easy way to calculate the marginal effects of my independent variables?
If you have an solution, please describe it as simple as possbile, since I'm not so familiar with all this technical stuff
Thanks,
micha
PS: I use Eviews 6

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12326
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Marginal Effects
The manual has a good discussion of this. Look under "Procedures for Binary Equations" in Chapter 30.
Follow us on Twitter @IHSEViews
Re: Marginal Effects
Thanks for your answer!
I’ve looked it up in the handbook. Just to get sure:
1) I have my estimation output
2) Then I click on “Proc”, Forecast
3) There I click on “Index – where Prob = 1F(Index)”
4) Then “Proc” and “Make Residual Series”, let’s say name xy
5) Afterwards I multiply each single independent variable with @dnorm(xy)
Is that right?
I’m so sorry for that stupid article, but as I’ve mentioned it, I need it simple
Thanks again,
micha
I’ve looked it up in the handbook. Just to get sure:
1) I have my estimation output
2) Then I click on “Proc”, Forecast
3) There I click on “Index – where Prob = 1F(Index)”
4) Then “Proc” and “Make Residual Series”, let’s say name xy
5) Afterwards I multiply each single independent variable with @dnorm(xy)
Is that right?
I’m so sorry for that stupid article, but as I’ve mentioned it, I need it simple
Thanks again,
micha

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12326
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Marginal Effects
In step 5 you multiply by the coefficient, not the independent variable.
Follow us on Twitter @IHSEViews
Re: Marginal Effects
Just to get that right: let's say one of my exogenous variables is "age" an its value in my estimation output is 0.5
So I mulitply 0.5*@dnorm(xy) and the result is the marginal effect. Is that correct?
Thanks again!
So I mulitply 0.5*@dnorm(xy) and the result is the marginal effect. Is that correct?
Thanks again!

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12326
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Marginal Effects
Once again thanks for your patience!!
Re: Marginal Effects
Hi,
I am also working on a probit model, and I would like to see the marginal effect of a categorical variable on the dependent variable, in particular, the marginal effect of higher education on the probability of being poor. I checked the "Procedures for Binary Equations" which QMS Gareth suggested but for some reason, the advice on this part couldn't work in Eviews. In other words, when I click Proc, I don't see anything like "Forecast (Fitted Probability/Index)" or "Make Residual Series" button. By the way, I am using Eviews 6. So I couldn't calculate with that way and I am sort of stuck. I tried another way to calculate it but it didn't give expected results. I mean the results are by far higher than expected. Let me share my code here, and I would appreciate if somebody advises me to overcome this problem. Thanks in advance.
This is my model;
probit(h) poor4e c reg1 reg2 reg3 reg5 eth2 eth3 eth4 dem2 n_adult n_child ed12 edu5
This is what I tried to calculate the marginal affect of edu5, by keeping all other variables constant at their mean values;
!z_highedu=c(1)+c(2)*@mean(reg1)+c(3)*@mean(reg2)+c(4)*@mean(reg3)+c(5)*@mean(reg5)+c(6)*@mean(eth2)+c(7)*@mean(eth3)+c(8)*@mean(eth4)+c(9)*@mean(dem2)+c(10)*@mean(n_adult)+c(11)*@mean(n_child)+c(12)*@mean(ed12)+c(15)*1
!p_highedu=@cnorm(!z_highedu)
!z_nonhighedu=c(1)+c(2)*@mean(reg1)+c(3)*@mean(reg2)+c(4)*@mean(reg3)+c(5)*@mean(reg5)+c(6)*@mean(eth2)+c(7)*@mean(eth3)+c(8)*@mean(eth4)+c(9)*@mean(dem2)+c(10)*@mean(n_adult)+c(11)*@mean(n_child)+c(12)*@mean(ed12)+c(15)*0
!p_nonhighedu=@cnorm(!z_nonhighedu)
table (2,4)education
education (1,1)="!z_highedu"
education (1,2)="!p_highedu"
education (2,1)=!z_highedu
education (2,2)=!p_highedu
education (1,3)="!z_nonhighedu"
education (1,4)="!p_nonhighedu"
education (2,3)=!z_nonhighedu
education (2,4)=!p_nonhighedu
show education
By comparing !z_highedu and !z_nonhighedu or !p_highedu and !p_nonhighedu, I was hoping to see the marginal effect, but it is way higher than expected
I am also working on a probit model, and I would like to see the marginal effect of a categorical variable on the dependent variable, in particular, the marginal effect of higher education on the probability of being poor. I checked the "Procedures for Binary Equations" which QMS Gareth suggested but for some reason, the advice on this part couldn't work in Eviews. In other words, when I click Proc, I don't see anything like "Forecast (Fitted Probability/Index)" or "Make Residual Series" button. By the way, I am using Eviews 6. So I couldn't calculate with that way and I am sort of stuck. I tried another way to calculate it but it didn't give expected results. I mean the results are by far higher than expected. Let me share my code here, and I would appreciate if somebody advises me to overcome this problem. Thanks in advance.
This is my model;
probit(h) poor4e c reg1 reg2 reg3 reg5 eth2 eth3 eth4 dem2 n_adult n_child ed12 edu5
This is what I tried to calculate the marginal affect of edu5, by keeping all other variables constant at their mean values;
!z_highedu=c(1)+c(2)*@mean(reg1)+c(3)*@mean(reg2)+c(4)*@mean(reg3)+c(5)*@mean(reg5)+c(6)*@mean(eth2)+c(7)*@mean(eth3)+c(8)*@mean(eth4)+c(9)*@mean(dem2)+c(10)*@mean(n_adult)+c(11)*@mean(n_child)+c(12)*@mean(ed12)+c(15)*1
!p_highedu=@cnorm(!z_highedu)
!z_nonhighedu=c(1)+c(2)*@mean(reg1)+c(3)*@mean(reg2)+c(4)*@mean(reg3)+c(5)*@mean(reg5)+c(6)*@mean(eth2)+c(7)*@mean(eth3)+c(8)*@mean(eth4)+c(9)*@mean(dem2)+c(10)*@mean(n_adult)+c(11)*@mean(n_child)+c(12)*@mean(ed12)+c(15)*0
!p_nonhighedu=@cnorm(!z_nonhighedu)
table (2,4)education
education (1,1)="!z_highedu"
education (1,2)="!p_highedu"
education (2,1)=!z_highedu
education (2,2)=!p_highedu
education (1,3)="!z_nonhighedu"
education (1,4)="!p_nonhighedu"
education (2,3)=!z_nonhighedu
education (2,4)=!p_nonhighedu
show education
By comparing !z_highedu and !z_nonhighedu or !p_highedu and !p_nonhighedu, I was hoping to see the marginal effect, but it is way higher than expected
Re: Marginal Effects
hi
I am using Probit estimation and want to get marginal effects. previous posting suggest using command of @dnorm(xy) and then multiplying with the estimated coefficients. I cannot see this series @dnorm(xy) in the working file, how to get this series and even If I have it then how to get a single value of mariginal effect for each estimated coefficeint?
look forward to someone's suggestions, thanks.
I am using Probit estimation and want to get marginal effects. previous posting suggest using command of @dnorm(xy) and then multiplying with the estimated coefficients. I cannot see this series @dnorm(xy) in the working file, how to get this series and even If I have it then how to get a single value of mariginal effect for each estimated coefficeint?
look forward to someone's suggestions, thanks.

 Posts: 3
 Joined: Mon Mar 12, 2012 9:56 am
Re: Marginal Effects
I would also like to know how to get one value for marginal effects.
I've multiplied this @dnorm(xy) with my coefficient for a certain variable; but now i get a whole column of values. How do I turn it into one value for the marginal effect of this variabele?
Thanks!
I've multiplied this @dnorm(xy) with my coefficient for a certain variable; but now i get a whole column of values. How do I turn it into one value for the marginal effect of this variabele?
Thanks!
Re: Marginal Effects
I am trying to estimate marginal effects for a logit model.
I have followed the instructions of several prior blogs:
 estimate the logit
 forecast the index and save as indexF
 create scalar: scalar xb = @mean(indexF) (this value is 0.4166)
 create scalar: scalar l_xb = @dlogistic(xb) (this value is 0.239)
The problem is that some of the coefficient estimates in the logistic regression are quite large, eg 39.8 and 25.2. If I multiply these coefficient estimates times 0.239 I get a number well above 1 which doesn't make sense.
Thanks for your help.
I have followed the instructions of several prior blogs:
 estimate the logit
 forecast the index and save as indexF
 create scalar: scalar xb = @mean(indexF) (this value is 0.4166)
 create scalar: scalar l_xb = @dlogistic(xb) (this value is 0.239)
The problem is that some of the coefficient estimates in the logistic regression are quite large, eg 39.8 and 25.2. If I multiply these coefficient estimates times 0.239 I get a number well above 1 which doesn't make sense.
Thanks for your help.
Re: Marginal Effects
Okay. I have had a follow on thought.
The values I get from those calculations are the change in probability for a 1 unit change in the explanatory variable.
I get the large coefficients for variables with relatively small standard deviations.
So, is it accurate to take the standard deviation for an explanatory variable and multiply it by the value I get from the above calculations and conclude that this is the effect of a one standard deviation change in x?
eg, the 39.8 coefficient estimate I reference above is for a variable with a standard deviation of 0.03. So, (39.8 * 0.23) * 0.03 = 0.275. This tells me a one st dev increase in this variable is associated with a higher probability of 27.5%
Is this a correct interpretation?
Many thanks.
The values I get from those calculations are the change in probability for a 1 unit change in the explanatory variable.
I get the large coefficients for variables with relatively small standard deviations.
So, is it accurate to take the standard deviation for an explanatory variable and multiply it by the value I get from the above calculations and conclude that this is the effect of a one standard deviation change in x?
eg, the 39.8 coefficient estimate I reference above is for a variable with a standard deviation of 0.03. So, (39.8 * 0.23) * 0.03 = 0.275. This tells me a one st dev increase in this variable is associated with a higher probability of 27.5%
Is this a correct interpretation?
Many thanks.

 EViews Developer
 Posts: 2620
 Joined: Wed Oct 15, 2008 9:17 am
Re: Marginal Effects
Those marginal effects are derivatives, not unit change differences.

 Posts: 4
 Joined: Sat May 23, 2015 10:52 am
Re: Marginal Effects
EViews Glenn wrote:Those marginal effects are derivatives, not unit change differences.
Hi Gleen,
so what would this precisely mean? Sorry for the question, but I am an absolute newbie to statistical analysis.Say I have for a variable a marginal effects coefficient of 0.106. What does this tell me?
Best regards,
Max

 Posts: 1
 Joined: Tue Mar 05, 2019 3:40 am
Re: Marginal Effects
hi
first estimate your logit model, then name it, like eq1.
write the code below in command box. after each line of code, press enter.
eq1.forecast(i) xbf
scalar meanxb = @mean(xbf)
scalar meffectw = @dnorm(meanxb)
scalar meffectw = @dnorm(@mean(xbf))
vector meffects = meffectw*eq1.@coefs
logit marginal effects results are saved in "meffect" as a vector.
first estimate your logit model, then name it, like eq1.
write the code below in command box. after each line of code, press enter.
eq1.forecast(i) xbf
scalar meanxb = @mean(xbf)
scalar meffectw = @dnorm(meanxb)
scalar meffectw = @dnorm(@mean(xbf))
vector meffects = meffectw*eq1.@coefs
logit marginal effects results are saved in "meffect" as a vector.
Who is online
Users browsing this forum: No registered users and 10 guests