another dummy manipulation question

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Jason, EViews Moderator, EViews Gareth, EViews Steve, EViews Pamela

another dummy manipulation question

Postby garchiemanning on Mon Apr 16, 2012 4:36 pm

After querying related threads, I still have a question regarding dummy variables.

Say I have a .txt file with 130 dates in the format "yyyy-mm-dd" that represent the release of an inflation report. I want to create a series in my workfile of 5000 obs which only equals one if the dates from my .txt file coincide with the date index of the workfile, i.e. there should be 130 1's and 4870 0's.

As it stands now, I'm doing
Code: Select all
series inflation=0


and then manually going through and adding 1's where they should be.

I hope this explains my problem.


Thanks
garchiemanning
 
Posts: 7
Joined: Fri Apr 13, 2012 9:00 am

another dummy manipulation question

Postby EViews Gareth on Mon Apr 16, 2012 5:10 pm

Code: Select all
Series inflation = mydate=@date
Follow us on Twitter @IHSEViews
EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
 
Posts: 5786
Joined: Tue Sep 16, 2008 5:38 pm

Re: another dummy manipulation question

Postby garchiemanning on Mon Apr 16, 2012 5:41 pm

Thanks for the reply.

What does mydate correspond to? Is that my imported file? If so, which import method should be used?

So far, all attempts to import the text file result in a series the length of the index propagated with NA's.

Sorry for any confusion.
garchiemanning
 
Posts: 7
Joined: Fri Apr 13, 2012 9:00 am

another dummy manipulation question

Postby EViews Gareth on Mon Apr 16, 2012 7:55 pm

Post your file
Follow us on Twitter @IHSEViews
EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
 
Posts: 5786
Joined: Tue Sep 16, 2008 5:38 pm

Re: another dummy manipulation question

Postby garchiemanning on Mon Apr 16, 2012 9:05 pm

dgrade, ecba, ecbs, gann are dummy's

thanks
Attachments
greece.WF1
(222.61 KiB) Downloaded 17 times
inflation_dummy.txt
(1.55 KiB) Downloaded 26 times
garchiemanning
 
Posts: 7
Joined: Fri Apr 13, 2012 9:00 am

Re: another dummy manipulation question

Postby EViews Esther on Tue Apr 17, 2012 9:21 am

The following steps will explain the way to create a dummy variable you need:
1. Create a new page
2. Load the data from the txt file (inflation_dummy.txt), then a new series (e.g. series01) will be created.
3. Copy series01 to the greece page
4. Create a dummy variable by using a command @recode

Please see http://eviews.com/Forum_support/Random/dummyimport.htm
EViews Esther
EViews Developer
 
Posts: 127
Joined: Fri Sep 03, 2010 7:57 am


Return to Data Manipulation

Who is online

Users browsing this forum: Google [Bot] and 3 guests