Question: min or max of several time series

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

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

mamo
Posts: 205
Joined: Wed Nov 07, 2012 9:11 am

Question: min or max of several time series

Postby mamo » Thu Feb 11, 2016 6:32 am

Dear community,
any straightforward way of obtaining the min or max of several series?
I am aware that it can be programmed in some lenght; I'm looking for a one-liner which would also be good for the command line.
Example programme (not the most elegant one) below is just to clarify what I am after.
Best, mamo

Code: Select all

'Create a data set with !n=3 series wfreate a 2000 2015 !n=3 for !i=1 to !n series x{!i}=nrnd next 'Compute xmin as the minimum of the !n series group xs x? xmin=xs(1) for !i=2 to xs.@count xmin = xmin*(xmin < xs(!i)) + xs(!i)*(xs(!i) < xmin) next line xs xmin

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

Re: Question: min or max of several time series

Postby EViews Gareth » Thu Feb 11, 2016 8:24 am


mamo
Posts: 205
Joined: Wed Nov 07, 2012 9:11 am

Re: Question: min or max of several time series

Postby mamo » Fri Feb 12, 2016 12:50 am

Oh, indeed; many thanks for the hint.
Best, mamo


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests