Dummy variables

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

cemj
Posts: 6
Joined: Sat May 22, 2010 4:07 am

Dummy variables

Postby cemj » Wed May 26, 2010 9:14 am

Hello,

I was wondering how we could include dummy variables into our equation. We have The following simultaneous equationsystem;

dklcl=c(1)+c(2)*(dklcl(-1))+c(2)*(dklcl(-2))+c(2)*(dklcl(-3))+c(2)*(dklcl(-4))+ c(2)*(dklcl(-5))+c(3)*(-sp500+1,931650171)

dsp500=c(4)+c(5)*(dsp500(-1))+c(5)*(dsp500(-2))+c(5)*(dsp500(-3))+c(5)*(dsp500(-4))+c(5)*(dsp500(-5))+c(6)*(-klci+1,262344597)

and we want to include dummy variables such that the expression (-sp500+1,931650171) will take the value 1 if the sum in the paranthesises
is larger than zero, otherwise take the value 0 if the sum is equal to or less than zero. We also want to do the same for the expression
(-klci+1,262344597).

The problem is that the "numbers" in the paranthesies change; the number in the first equation changes after each estimation
and the number in the second equation change every 9th estimation.

We would be very grateful for any comments!

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

Re: Dummy variables

Postby startz » Wed May 26, 2010 9:22 am

Hello,

I was wondering how we could include dummy variables into our equation. We have The following simultaneous equationsystem;

dklcl=c(1)+c(2)*(dklcl(-1))+c(2)*(dklcl(-2))+c(2)*(dklcl(-3))+c(2)*(dklcl(-4))+ c(2)*(dklcl(-5))+c(3)*(-sp500+1,931650171)

dsp500=c(4)+c(5)*(dsp500(-1))+c(5)*(dsp500(-2))+c(5)*(dsp500(-3))+c(5)*(dsp500(-4))+c(5)*(dsp500(-5))+c(6)*(-klci+1,262344597)

and we want to include dummy variables such that the expression (-sp500+1,931650171) will take the value 1 if the sum in the paranthesises
is larger than zero, otherwise take the value 0 if the sum is equal to or less than zero. We also want to do the same for the expression
(-klci+1,262344597).

The problem is that the "numbers" in the paranthesies change; the number in the first equation changes after each estimation
and the number in the second equation change every 9th estimation.

We would be very grateful for any comments!
Two clarifying questions:
(1) What does the expression "(-sp500+1,931650171)" mean in EViews?
(2) There are quite a few sets of parentheses. Could you separate out one that you want to look at?

cemj
Posts: 6
Joined: Sat May 22, 2010 4:07 am

Re: Dummy variables

Postby cemj » Wed May 26, 2010 10:00 am

Two clarifying questions:
(1) What does the expression "(-sp500+1,931650171)" mean in EViews?
(2) There are quite a few sets of parentheses. Could you separate out one that you want to look at?




(1): The sp500 is a series of stock return and the 1,931650171 is just a number that we change after each estimation
(2): The paranthesises are the last set of parameters in each of the equations, (-sp500+1,931650171) and (-klci+1,262344597).

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

Re: Dummy variables

Postby startz » Wed May 26, 2010 11:37 am

Two clarifying questions:
(1) What does the expression "(-sp500+1,931650171)" mean in EViews?
(2) There are quite a few sets of parentheses. Could you separate out one that you want to look at?




(1): The sp500 is a series of stock return and the 1,931650171 is just a number that we change after each estimation
(2): The paranthesises are the last set of parameters in each of the equations, (-sp500+1,931650171) and (-klci+1,262344597).
:roll:
In the United States, we use the decimal point "." where much of the rest of the world uses the comma. We use the comma to separate arguments of an expression. That's why I didn't understand what you were doing. Entirely my fault. Since I'm sitting in Germany at the moment, I should have known better.

Just use

((-sp500+1,931650171)>0)

cemj
Posts: 6
Joined: Sat May 22, 2010 4:07 am

Re: Dummy variables

Postby cemj » Wed May 26, 2010 11:58 am

Oh, yes, youre right about the "." :)

But if we use ((-sp500+1,931650171)>0)
will eviews really know if its supposed to be multiplied by 1 if its larger than 0 and if its smaller than 0 then multiplied by 0..?

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

Re: Dummy variables

Postby startz » Wed May 26, 2010 11:21 pm

Oh, yes, youre right about the "." :)

But if we use ((-sp500+1,931650171)>0)
will eviews really know if its supposed to be multiplied by 1 if its larger than 0 and if its smaller than 0 then multiplied by 0..?
Yes. In EViews "true" evaluates to 1.0 and "false" evaluates to 0.0. As a check, create a series equal to the expression and take a look at it.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests