"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.

"List" and "Cards" problem

Postby jonasdovern » Tue Aug 03, 2010 7:30 am

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?
jonasdovern
 
Posts: 68
Joined: Sat Apr 11, 2009 10:30 am

Re: "List" and "Cards" problem

Postby moderator » Tue Aug 03, 2010 10:07 am

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


Return to Help With Programming

Who is online

Users browsing this forum: Google [Bot] and 1 guest