Page 1 of 1

Matching a date with a series observation

Posted: Mon Nov 23, 2009 8:20 am
by ashtongate
Anyone know how to match a series observation to a date? I know about @dtoo and @otod, but I am thinking more of identifying the date for which a series reached it maximum value; i.e. I do not know the observation number, just the criteris (that it is the max),

Cheers!

Re: Matching a date with a series observation

Posted: Mon Nov 23, 2009 8:59 am
by EViews Gareth

Code: Select all

=@otod(@imax(x))
where x is the name of your series.

Re: Matching a date with a series observation

Posted: Mon Nov 23, 2009 9:12 am
by ashtongate
Great, thanks!

Re: Matching a date with a series observation

Posted: Thu Dec 03, 2009 10:20 am
by atoch
Bonjour,

I'm trying to use the @otod() function.
Documentation says it returns a string but when I try to store the output of @otod() into an object of type alpha, I receive an error massage saying that @OTOD is not a Genr or series expression function.

Code: Select all

alpha mytext mytext = @otod(@imax(FRA_CG_ADBQ))
Where FRA_CG_ADBQ is a quarterly time series with a sample running from 1950q1 to 2009q2.
I've tried simplier versions of the above code like :

Code: Select all

%1 = @otod(5)
I don't receive the error message but I can't access the content of the temporary variable %1 so it doesn't help.

Thanks

Arnaud Atoch

Re: Matching a date with a series observation

Posted: Thu Dec 03, 2009 11:00 am
by EViews Gareth

Code: Select all

alpha mytext %s = @otod(5) mytext = %s

Re: Matching a date with a series observation

Posted: Thu Dec 03, 2009 12:26 pm
by atoch
Thanks.

When running your above code the following error is produced :
%s is not defined

Both with Eviews6 and Eviews7 beta.

Arnaud Atoch

Re: Matching a date with a series observation

Posted: Thu Jan 21, 2010 10:38 am
by EViews Gareth
Sounds like you're running the code from the command line, rather than from within an EViews program. You'll have to run it in an EViews program.

If you want to use it from the command line, you could do:

Code: Select all

alpha mytext string s = @otod(5) mytext = s