Page 1 of 1

how to solve error SR4 ?

Posted: Wed Jun 16, 2010 5:58 am
by wendyyuan
HI,
when i run a programme, i get the error SR4(tried to use series number -5, -series n1 n2 triples are no longer legal). what does the error mean? how to solve the problem?

i have series x1 x2 hr1, all series with the same date (they do match, no data dismatch problem)
with code ''set v1 = x1 - hr*x2 '', i think it might could not time up two time series, then i try to use a loop
''do i=1,10
set v1 i i = x1 i i - hr i i*x2 i i
end do ''
it does not work, then i give up loop, replace the 'set v1 = x1 - hr*x2 ' with 'set v1(t) = x1(t) - hr(t)*x2(t)' and 'set v1 = x1(t) - hr(t)*x2(t) ' respectively, neither of them work, and still have problem with error SR4.
How to sort it out?
Appreciate any suggestion!

Re: how to solve error SR4 ?

Posted: Wed Jun 16, 2010 8:00 am
by TomDoan

Code: Select all

set v1 = x1-hr*x2
sounds like what you want. Did you have the required spaces before and after the =?

Re: how to solve error SR4 ?

Posted: Wed Jun 16, 2010 10:13 am
by wendyyuan
TomDoan wrote:

Code: Select all

set v1 = x1-hr*x2
sounds like what you want. Did you have the required spaces before and after the =?
yesyes, i did put space before and after =, but i put space before and after - . oh, i realise space should not be put on -.
it work now. thanks so much!