I apologize in advance for my poor english!
I have a little problem with a subroutine, and i'll be grateful if you could help me.
While writing this simple subroutine, i always get the message "N is not defined or is an illegal command in N=@obs(series x)".
Since I'm new to EViews, i guess the problem could be fixed very briefly by one of you.
Here is the code i wrote
Code: Select all
subroutine local sub (series x, scalar y)
n =@obs(series x)
banda sup 1,96*1/sqrt(n)
banda inf= -1,96*1/sqrt(n)
!contatore= 0
for !i=1 to 10
scalar c = @cor(x), x(-!i)
if c< banda inf and c> banda sup
!contatore= !contatore + 1
endif
next
scalar y= contatore/10
endsubThanks in advance to all of you!
