dumy variable problem

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

johnsmith
Posts: 8
Joined: Tue Aug 10, 2010 11:11 am

dumy variable problem

Postby johnsmith » Tue Aug 10, 2010 11:33 am

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

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

Re: dumy variable problem

Postby EViews Gareth » Tue Aug 10, 2010 11:43 am

Easiest way is:

spread c volatility @trend>200

marwa_agroudy
Posts: 3
Joined: Sun Aug 22, 2010 12:49 am

Re: dumy variable problem

Postby marwa_agroudy » Sun Aug 22, 2010 1:01 am

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

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

Re: dumy variable problem

Postby EViews Gareth » Sun Aug 22, 2010 1:28 am

If you already have a dummy variable, you do not need to use @expand. Just include the dummy variable by itself.

marwa_agroudy
Posts: 3
Joined: Sun Aug 22, 2010 12:49 am

Re: dumy variable problem

Postby marwa_agroudy » Sun Aug 22, 2010 4:41 am

then what does @expand do exactly?! i just wanna know...
thank you

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

dumy variable problem

Postby EViews Gareth » Sun Aug 22, 2010 12:29 pm

It automatically creates a set of dummies based upon the unique values in a series.

marwa_agroudy
Posts: 3
Joined: Sun Aug 22, 2010 12:49 am

Re: dumy variable problem

Postby marwa_agroudy » Mon Aug 23, 2010 12:33 am

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

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

Re: dumy variable problem

Postby startz » Mon Aug 23, 2010 6:45 am

@expand creates a new set of dummies.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests