Marginal effect plot

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Sebastian
Posts: 3
Joined: Tue Jun 22, 2021 1:42 pm

Marginal effect plot

Postby Sebastian » Sun Jul 03, 2022 7:29 am

Hello,

I am a user of EViews 12 and I want to analyze a panel dataset by running an OLS with an interaction term.

y = c(1) + c(2)*x + c(3)*z + c(4)*xz + c(4)*control variables + e

For this equation, I would like to display a marginal effects plot with a 95 percent confidence interval. This plot should show the influence of x on y, given the second independent variable in the interaction term z:

dy/dx = c(2) + c(4)*z.

Is there an easy way to do this in EViews? I could not find a solution in manual and therefore would be very grateful for help.

Best,
Sebastian

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Marginal effect plot

Postby startz » Sun Jul 03, 2022 2:47 pm

Code: Select all

series dydz = c(3) + c(4)*z
scat z dydz

Sebastian
Posts: 3
Joined: Tue Jun 22, 2021 1:42 pm

Re: Marginal effect plot

Postby Sebastian » Sat Jul 09, 2022 3:56 am

Thank you! That works very well and helps a lot. What I do not understand, however, is how to get the cofidence intervals (95 % in my case) into the plot. How does that work?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Marginal effect plot

Postby startz » Sat Jul 09, 2022 6:43 am

You'll need to retrieve the variance-covariance matrix of the coefficients from the regression. Then get the variance of the point estimate using the standard formula for linear combinations of random variables. Take the square root, and then take the point estimates plus and minus twice that square root.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 29 guests