Date of a maximum/minimum

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Date of a maximum/minimum

Postby javiersan » Fri May 21, 2010 1:10 am

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

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

Re: Date of a maximum/minimum

Postby EViews Gareth » Fri May 21, 2010 7:53 am

Perhaps you're looking for the @imax and @imin functions?


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests