"List" and "Cards" problem

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
jonasdovern
Posts: 97
Joined: Sat Apr 11, 2009 10:30 am

"List" and "Cards" problem

Unread post 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?
moderator
Site Admin
Posts: 269
Joined: Thu Oct 19, 2006 4:33 pm

Re: "List" and "Cards" problem

Unread post 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
Post Reply