Page 1 of 1

dummy variable

Posted: Sun Dec 18, 2011 11:03 am
by Nau2306
Hello

Given a return series, I would like to create a dummy variable for the maximum and the minimum return values and remove these values from the return series. How should I go about to do that in eviews6?

Thanks

Re: dummy variable

Posted: Mon Dec 19, 2011 8:55 am
by EViews Gareth
It isn't 100% clear what you're asking, but something like:

Code: Select all

series dummy=0 smpl if x=@max(x) or x=@min(x) dummy=1 smpl @all

Re: dummy variable

Posted: Mon Dec 19, 2011 9:20 am
by Nau2306
This is exactly what I was looking for but now how do I remove the maximum observation from the original series x?


Thanks

Re: dummy variable

Posted: Mon Dec 19, 2011 9:34 am
by EViews Gareth
Define "remove".

Re: dummy variable

Posted: Mon Dec 19, 2011 9:41 am
by Nau2306
Say we have data from 01/01/2000 to 31/12/2005 and the maximum value is at 04/03/2002. By remove, I mean I would like to delete or say trim the observation at 04/03/2002.

Re: dummy variable

Posted: Mon Dec 19, 2011 9:43 am
by startz
Most everything in EViews operates on the current sample. You can specify which observations to include with the smpl command. For example,

Code: Select all

smpl if not dummy

Re: dummy variable

Posted: Tue Jan 10, 2012 12:29 am
by nayana3012
hi all, can somebody help me as to how to create dummy variables in eviews.\
infact i want to create dummies for post and pre crisis of 2007 and I want to create seasonal dummies also since my data is quarterly. can somebody help me as to how i can create those 2 dummies??thank you please!!! :cry:

Re: dummy variable

Posted: Wed Jan 11, 2012 9:04 am
by EViews Gareth