Page 1 of 1
Dummy variables
Posted: Wed May 26, 2010 9:14 am
by cemj
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!
Re: Dummy variables
Posted: Wed May 26, 2010 9:22 am
by startz
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?
Re: Dummy variables
Posted: Wed May 26, 2010 10:00 am
by cemj
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).
Re: Dummy variables
Posted: Wed May 26, 2010 11:37 am
by startz
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).
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)
Re: Dummy variables
Posted: Wed May 26, 2010 11:58 am
by cemj
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..?
Re: Dummy variables
Posted: Wed May 26, 2010 11:21 pm
by startz
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.