Page 1 of 1

"List" and "Cards" problem

PostPosted: Tue Aug 03, 2010 7:30 am
by jonasdovern
I have the following problem in a procedure. The follwoing code
Code: Select all
      
disp lnfac %rows(factors)
list index = 1 to lnfac
graph(key=below,klabel=F_lab,header="Factors estimated by Kalman filter (2nd step)") lnfac
cards factors(index) from to

results in the following output
Code: Select all
3 3
## MAT15. Subscripts Too Large or Non-Positive
The Error Occurred At Location 0843 of GETKFFACTORS
Line 42 of GETKFFACTORS
Line 47 of FACTOR

Doing something like
Code: Select all
graph(key=below,klabel=F_lab,header="Factors estimated by Kalman filter (2nd step)") lnfac
# factors(1) from to
# factors(2) from to
# factors(3) from to

works without any problems. I am even more confused why the cards-command is not working, since I copy-pasted it from another procedure where it works well! Any suggestions where my mistake is?

Re: "List" and "Cards" problem

PostPosted: Tue Aug 03, 2010 10:07 am
by moderator
I don't see any obvious problems with your setup. I just did a simple test using similar code and it worked fine.

Are you really using "From" and "to" as variable names? If so, that's not a good idea as "TO" is a reserved word in RATS. If that's actually how your code reads, try something other than "to" for that variable name.

Other than that, we'd probably need to see the whole program (and data file if possible) to offer suggestions. You can send them to support@estima.com.

Regards,
Tom Maycock