Page 1 of 1

@erecode() with <>"something"

Posted: Tue Mar 20, 2018 10:04 am
by leocaza
Hi, there is no example of @erecode() in "eviews help".

could you there me how to do @erecode() on a matrix, to recode everything not equal to "X"

@erecode(Matrix, <>0, NA)

... with series, i woulld do @recode(series<>0,NA, series)

Thank you

Re: @erecode() with <>"something"

Posted: Tue Mar 20, 2018 10:16 am
by EViews Gareth
Example is available in the PDF docs, but here's another:

Code: Select all

wfcreate u 10 matrix(3,3) a matrix(3,3) b matrix(3,3) e nrnd(a) nrnd(b) nrnd(e) matrix res = @erecode(@elt(a,0),b,e) 'res will be equal to "b" whenever a<0, and e otherwise.