Page 1 of 1

Date of a maximum/minimum

Posted: Fri May 21, 2010 1:10 am
by javiersan
Hi,

I think there was a post about this before but I can't find it. I want to find the date a maximum and minimum occur in a series for a given sample period, the only code I can come up with is

Code: Select all

smpl 1/1/2000 1/1/2002 %subsmpl=@pagesmpl series max_abs=@max({%ser},%subsmpl) series temp=@recode({%ser}=max_abs,max_abs,na) string max_dt=@otod(@ifirst(temp))
which seems a bit cumbersome. Do you have any better suggestions?

Thanks,

Javier

Re: Date of a maximum/minimum

Posted: Fri May 21, 2010 7:53 am
by EViews Gareth
Perhaps you're looking for the @imax and @imin functions?