Page 1 of 1

Question: min or max of several time series

Posted: Thu Feb 11, 2016 6:32 am
by mamo
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

Re: Question: min or max of several time series

Posted: Thu Feb 11, 2016 8:24 am
by EViews Gareth

Re: Question: min or max of several time series

Posted: Fri Feb 12, 2016 12:50 am
by mamo
Oh, indeed; many thanks for the hint.
Best, mamo