Page 1 of 1

NA in series

Posted: Mon Mar 13, 2017 9:10 am
by stefanp
Hey there,

I have a series that, on purpose, contains a couple of "NA"s.

I need to extract the numerical value from series A if series B assumes the smallest value. This value in turn should be assigned to a scalar. I though of something like this

Code: Select all

if B=@minsby(B,identifier) then scalar=A endif
However, I end up with the found NA in matrix error message. Any ideas how to proceed?

Re: NA in series

Posted: Mon Mar 13, 2017 9:15 am
by EViews Gareth
Not entirely sure I follow, but I think something like:

Code: Select all

smpl if b=@min(b) scalar myscalar = @min(a)
(note that second @min is arbitrary).

Re: NA in series

Posted: Mon Mar 13, 2017 9:39 am
by stefanp
I am using a Panel and hence, each cross-section has its own minimum. Since I am looping through the cross-sections, I thought @minsby instead of @mins would be appropriate because the former allows to specify an identifier.

is there another way to solve my problem without changing the current sample?

Re: NA in series

Posted: Mon Mar 13, 2017 9:54 am
by EViews Gareth
Can you describe in words what you're trying to do?

If there's a panel, why is there a scalar? What are you taking the minimum over? (Time, cross-sections, both?)