Page 1 of 1

another dummy manipulation question

Posted: Mon Apr 16, 2012 4:36 pm
by garchiemanning
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

another dummy manipulation question

Posted: Mon Apr 16, 2012 5:10 pm
by EViews Gareth

Code: Select all

Series inflation = mydate=@date

Re: another dummy manipulation question

Posted: Mon Apr 16, 2012 5:41 pm
by garchiemanning
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.

another dummy manipulation question

Posted: Mon Apr 16, 2012 7:55 pm
by EViews Gareth
Post your file

Re: another dummy manipulation question

Posted: Mon Apr 16, 2012 9:05 pm
by garchiemanning
dgrade, ecba, ecbs, gann are dummy's

thanks

Re: another dummy manipulation question

Posted: Tue Apr 17, 2012 9:21 am
by EViews Esther
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