dummy variable

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

Nau2306
Posts: 74
Joined: Thu Nov 17, 2011 11:51 am

dummy variable

Postby Nau2306 » Sun Dec 18, 2011 11:03 am

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

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

Re: dummy variable

Postby EViews Gareth » Mon Dec 19, 2011 8:55 am

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

Nau2306
Posts: 74
Joined: Thu Nov 17, 2011 11:51 am

Re: dummy variable

Postby Nau2306 » Mon Dec 19, 2011 9:20 am

This is exactly what I was looking for but now how do I remove the maximum observation from the original series x?


Thanks

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

Re: dummy variable

Postby EViews Gareth » Mon Dec 19, 2011 9:34 am

Define "remove".

Nau2306
Posts: 74
Joined: Thu Nov 17, 2011 11:51 am

Re: dummy variable

Postby Nau2306 » Mon Dec 19, 2011 9:41 am

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.

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

Re: dummy variable

Postby startz » Mon Dec 19, 2011 9:43 am

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

nayana3012
Posts: 2
Joined: Mon Jan 09, 2012 11:01 am

Re: dummy variable

Postby nayana3012 » Tue Jan 10, 2012 12:29 am

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:

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

Re: dummy variable

Postby EViews Gareth » Wed Jan 11, 2012 9:04 am



Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests