Page 1 of 1

dumy variable problem

Posted: Tue Aug 10, 2010 11:33 am
by johnsmith
Hi all, i hope someone can help
Basically i have a time series of bid-ask spreads for a stock- around 400 observations. I want to regree bid-ask spreads on volatility and also a dummy variable corresponding to when a piece of legislation came in. I Want to infer whether the spreads got bigger or smaller after the legislation came in.

Suppose the legislation came in on the 200th observation. Hence i beleive i should create a dummy variable corresponding to those variables after the 200th, i.e. between the 200 and 400th observation. Hence if the dummy is negative and significant i can infer that the spreads declined.

spread c volatility dummy(corresponding to post legislation period)

Can neone propose the correct coding i need to use to do this.

Your help would be much appreciated.

Many thanks

Re: dumy variable problem

Posted: Tue Aug 10, 2010 11:43 am
by EViews Gareth
Easiest way is:

spread c volatility @trend>200

Re: dumy variable problem

Posted: Sun Aug 22, 2010 1:01 am
by marwa_agroudy
hello
i have a question regarding dummy variables, i would appreciate if you can help.
im doing least squares regression of price regressed on 3 independent variables and a dummy one. it appears in the excel sheet when the dummy variables is supposed to be 1 and when it's supposed to be 0, so i already have the data for the variable. when working on eviews, the guide says that we have to write the dummy variables as @expand(name of the variable). when i do that i get two coefficients in the summary output, one for dummy variables= 1 and another for dummy variables = 0. is it supposed to be only one coefficient since i have only one dummy variables?! am i doing something wrong or is that the normal summary output for such a case?
thank you

Re: dumy variable problem

Posted: Sun Aug 22, 2010 1:28 am
by EViews Gareth
If you already have a dummy variable, you do not need to use @expand. Just include the dummy variable by itself.

Re: dumy variable problem

Posted: Sun Aug 22, 2010 4:41 am
by marwa_agroudy
then what does @expand do exactly?! i just wanna know...
thank you

dumy variable problem

Posted: Sun Aug 22, 2010 12:29 pm
by EViews Gareth
It automatically creates a set of dummies based upon the unique values in a series.

Re: dumy variable problem

Posted: Mon Aug 23, 2010 12:33 am
by marwa_agroudy
what if i already have the values for the dummy variable in the excel sheet im using, will it use these or just create another set of its own?!
thank you

Re: dumy variable problem

Posted: Mon Aug 23, 2010 6:45 am
by startz
@expand creates a new set of dummies.