Dummy Variable

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

makaveli1981
Posts: 3
Joined: Fri Sep 10, 2010 10:08 am

Dummy Variable

Postby makaveli1981 » Fri Sep 10, 2010 10:34 am

Hi!

EViews 6

I have 3 series:
- net income as dependent variable (NI)
- stock returns as independent variable (RET)
- and a dummy variable: 1 if stock returns are negative, 0 if positive (NEG)

Regression: NI = c(1) + c(2)*RET + c(3)*NEG + c(4)*RET*NEG

My question is, how can I become a graph of this regression (two lines with different slopes for negative and positive stock returns in ONE picture)

Many thanks


Thomas

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Dummy Variable

Postby EViews Gareth » Fri Sep 10, 2010 10:39 am

Could you explain what you mean by "graph of this regression"?

makaveli1981
Posts: 3
Joined: Fri Sep 10, 2010 10:08 am

Re: Dummy Variable

Postby makaveli1981 » Fri Sep 10, 2010 10:46 am

RET-Axis and NI-Axis with all observations and linear regression (OLS), but two sections with different slopes according to dummy for negative and positive stock returns

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Dummy Variable

Postby EViews Gareth » Fri Sep 10, 2010 10:50 am

I cannot think of a way to do that.

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

Re: Dummy Variable

Postby startz » Fri Sep 10, 2010 11:23 am

Maybe something like this:

Create two series where the first is the fitted values when the dummy equals 1 and the second is when the dummy equals 0. Then recode the first series to NA when the dummy equals 0 and vice versa. Then graph both series against the independent variable.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Dummy Variable

Postby EViews Glenn » Fri Sep 10, 2010 12:18 pm

Good idea. You should be able to do the recode off of the single forecast series since you have the dummy.

(Gareth does point out to me that because you have the restriction, this won't work since the scatter with regression line will do the two regression lines without restriction).

makaveli1981
Posts: 3
Joined: Fri Sep 10, 2010 10:08 am

Re: Dummy Variable

Postby makaveli1981 » Fri Sep 10, 2010 1:59 pm

it sounds not bad... i'll try it...

i found an easy example in my statistic-script
it's structural interruption:

y/ x / D (dummy variable)

1.7/ 1/ 0
2.7/ 2/ 0
4.8/ 3/ 0
4.7/ 4/ 0
6.9/ 5/ 0
6.8/ 6/ 0
7.5/ 7/ 0
8.1/ 8/ 0
10.3/ 9/ 0
11.3/ 10/ 0
17.2/ 11/ 1
20.4/ 12/ 1
21.9/ 13/ 1
23/ 14/ 1
26.3/ 15/ 1
27.9/ 16/ 1
29.8/ 17/ 1
32.3/ 18/ 1
34.6/ 19/ 1
35.9/ 20/ 1

result: y = 1.000 + 0.997*x - 6.169*D + 1.075*D*x

splited regression:
y = 1.000 + 0.997*x if x = 1,...,10
y = -5.169 + 2.072*x if x = 11,...,20

when I run this regression in eviews using y=c(1)+c(2)*x+c(3)*dv+c(4)*dv*x as equation, I become correct coefficients as result. But I don't know how to make a scatter then... And in my script I can see two regression lines - splited! And I'm pretty sure that this guy, who made it, made it with eviews :lol:


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests