Loading/Compiling Procedures
Loading/Compiling Procedures
MacRATS won't let me use a procedure and churns out the dreaded "## CP18. MYPROC is not the Name of a PROCEDURE. (Did you forget to SOURCE?)". MYPROC is in the procedures folder, has a .src file extension. I have SOURCE'd it manually, too. Any ideas?
Re: Loading/Compiling Procedures
Can you post a copy of that?
Re: Loading/Compiling Procedures
I have replaced the (three) linreg commands in BaiPerron.src with linreg(robusterrors,lags=4,lwindow=quadratic,...). Saved it with another name ("baiperronrobust.src").
I'm calling the procedure with the following to get the Bai-Perron test results for a model with just a constant.
I'm calling the procedure with the following to get the Bai-Perron test results for a model with just a constant.
The code works fine up to and including @lsunit. But it does not like @baiperronrobust...OPEN DATA "/[...]/Monthly.xls"
CALENDAR(M) 2001:1
DATA(FORMAT=XLS,ORG=COLUMNS,LEFT=1) 2001:01 2014:12 sers1
SOURCE "c:/Applications/RATS 9.0/Procedures/baiperron.src"
@LSUNIT(LAGS=8,MODEL=CRASH,BREAKS=2,METHOD=GTOS) SERS1
@baiperronrobust(maxbreaks=3,minspan=24,tests,noprint) SERS1
# constant
Re: Loading/Compiling Procedures
source path\baiperron.src won't get a procedure that's on baiperronrobust.src.
Re: Loading/Compiling Procedures
No, of course it won't!
But this does not appear to be the problem, as RATS generates the same error message for even the correctly sourced procedures. Anyway, I will insist until I find the problem.
But this does not appear to be the problem, as RATS generates the same error message for even the correctly sourced procedures. Anyway, I will insist until I find the problem.
Re: Loading/Compiling Procedures
- The name of the file must be exactnameofprocedure.src (case insensitive)
- It needs to be on a directory on the procedure search path
- You need to make sure you rename the actual procedure the way you want.
Re: Loading/Compiling Procedures
OK, the problem was that I'd forgotten to change the name of the procedure IN BaiPerron.src. So, RATS was correctly informing me that I was calling a procedure that did not exist.
EDIT: just seen your response: it was number 3 in this case!
Thanks.
EDIT: just seen your response: it was number 3 in this case!
Thanks.