### Extracting values for matrix

Posted:

**Sat May 01, 2010 11:12 pm**Hi,

I am using Eviews 7 and I am trying to take a number of observations in series y when series x has an extreme value. I create series z to show the extreme and then try to use this to extract values from y. I have used the following code, but the matrix results remains full of zero. If I try to run the final stage in the command window, I am told that "An unnamed object cannot be converted to a string".

Any hints greatly appreciated.

Rob

I am using Eviews 7 and I am trying to take a number of observations in series y when series x has an extreme value. I create series z to show the extreme and then try to use this to extract values from y. I have used the following code, but the matrix results remains full of zero. If I try to run the final stage in the command window, I am told that "An unnamed object cannot be converted to a string".

Any hints greatly appreciated.

Rob

Code: Select all

`wf a 1990 2010`

series x=nrnd

series y=@trend

frml z=x>@quantile(x,0.95)

matrix(2,1) results

for !a = 1 to 11

if @elem(z,@otod(!a))=1 then

results(!a,1)=@elem(y,@otod(!a))

results (!a+1,1)=@elem(y,@otod(!a+1))

next

endif