A USER GUIDE OF RATS AND TSP
RATS (Regression Analysis of Time Series)
- RATS for UNIX in QED is version 4.30 and for DOS in DUN 211/DUN 350
is version 4.20.
The major improvement of version 4.20 over 4.10 is the enhancement
of graphics capability and different file extension of graphs. This will
be explained more details below and in
Examples:
-
RATS for UNIX and DOS may be executed in batch mode or in interactive
mode. In interactive mode, you can type in commands one at a time at the
prompt. RATS executes each instruction immediately, and directs any
resulting output to the terminal. This is suitable if you want to check
your programming codes. In batch mode, RATS reads instructions
from an input file, and writes the output either to the terminal or to a
specified output file. This is best for running long programs.
- The major differences between UNIX and DOS are in operating
commands only. For instance, in order to execute DOS RATS, one need to
type RATS386 whereas one need to type
RATS in UNIX. DOS RATS386 has GRAFEDIT and RATSDATA utility
but UNIX does not has those utilities. Nonetheless, The application
commands and functions are common to both versions.
- Although UNIX RATS does not have a convenient RATS editor utility
like DOS, one can use Notepad in Microsoft Windows 3.x
Accessories to copy and paste commands from your written program using
Notepad to the QED Terminal Window providing you are using WINSOCK
connecting to QED. The trick is to use EDIT option from the Notepad
to copy the comamnds, then go to QED Terminal window , use the
right buttom of your mouse and Select EDIT and PASTE
to the UNIX RATS ? prompt, and then hit ENTER key. This
trick is very handy when you don't have UNIX X windows.
- When executing programs, you should always becareful of the path
(directory) statemtents in your programs. It is recommended to put
a path statement in front of reading data files or procedures.
- There are sample programs, data, and procedures located in
C:\RATS for DOS version. UNIX's sample programs, data, and
procedures are in /usr/local/rats430/examples. The
detailed information of the programs and procedures are discussed fully in
RATS 4.0 Manual and its supplement.
- Beside the Basic Sample Programs in Examples, You can also look at my own written
programs or procedures in
My
RATS386 Programs and Procedures
- For more advanced third-party programs and procedures, click below:
RATS PROGRAMS
AND PROCEDURES
- I will recommend the DOS RATS386 for a beginner or one who needs
to do lots of graphics or inputs lots of different data format files. UNIX
RATS is superb for a user who has a huge job (e.g. Monte Carlo simulation
program which requires lots of RAM ) to run for several days since UNIX
can handle background jobs. For Windows 95 user, if you install Windows 95
over your previous DOS/Windows operating systems (e.g. Dual boot with
Windows 3.x or still have valid MS-DOS version), you can still run RATS386 by
going to MS-DOS prompt. You can take advantage the 32-bit RATS386
software. The DOS version in DUN 211 is not Windows 95 version. Windows
95 version is called as Version 4.3 in which QED does not have it yet.
Select your preferred version below to view more
information
UNIX RATS
-
DOS RATS386
TSP (Time Series
Processor)
- TSP for UNIX, LINUX in QED and for DOS are all version 4.30A.
- Unlike RATS, there are no differences between UNIX, LINUX, and DOS
version except the path statements.
- To execute TSP in interactive mode in UNIX, LINUX, and DOS, just type
tsp in the prompt with . TSP will prompt you a
message whether you want to supply a batch filename. If you want to run
in interactive mode, just hit Enter. To end the session ,
just type stop
- To execute TSP in batch mode in UNIX, LINUX, and DOS:
tsp first.tsp
the output will be stored in first.out automatically.
- In interactive mode, you can use up arrow key to retrieve
the previous commands or use down arrow key to retrieve the first
command. This feature functions like DOSKEY option in MS-DOS.
- Unlike RATS, TSP requires a semicolon (;) at the end of each
line's commands. Hence, TSP will continue to read your commands in multiple
lines unless there is a semicolon at the end of the command line.
- TSP 4.3 has option to adjust memory (RAM):
put the following line at the top of your program file (.tsp) or in a
login.tsp (TSP reads this file first when executing) in the current
directory.
options memory=4;
This command allows TSP to allocate 4 MB of memory for TSP.
The default value is 4, and the minimum value is 2.1 . (This is assuming
2MB for the code of TSP, and any additional memory is used for the
working space array). The maximum value is limited by the physical
RAM available in your PC machine or the remaining RAM left in QED server.
- It is important to note that 4 MB of memory for TSP is not
equivalent to your 4 MB physical RAM in your PC machine. Also, you don't
need to worry this option unless you work with a huge Monte Carlo
programs which requires lots of input/output data (e.g. storing several time-
series in each random simulation draw). It is also nice not to allocate
all of the memory (maximum value) to your program when you are at QED or
LINUX server since your colleagues also need RAM to run their programs.
- The following is the maximum value that I experiment during daytime
(the peak time). This value is for your reference that you should choose a
value much smaller than it. The value for LINUX and QED may vary
since they all depend on the size of the programs running at the time.
Also, if the QED server is crowded, you may not get your preferred value.
Then, you should try to run your program at night.
options memory = 120;
This is the maximum value for IBM-compatible PC machine which has 8 MB RAM
physically.
options memory = 368;
This is the maximum value for IBM-compatible PC machine which has 32 MB EDO
RAM physically.
options memory = 49;
This is the maximum value for LINUX.
options memory = 136;
This is the maximum value for QED.
options memory = 69;
This is the maximum value for SARGAN.
- After reading the Basic Sample Programs in Examples, You can also look at TSP advanced
programs from
TSP Official Web Site
You can borrow TSP Reference Manual (Version 4.3), TSP User
Guide (Version 4.3), and RATS 4.0 Manual and supplement manual from our QED
system administrator, Julie McCarthy (DUN 331) at mccarthj@qed.econ.queensu.ca
Copyright @1997 Irene Chan
Last Modified: January 8, 1997
If you have any comments, please feel free to email me
chani@qed.econ.queensu.ca
UNIX RATS
-
To execute RATS in interactive mode, just type rats and hit
Enter or Return key. RATS will bring up a
? prompt and will
execute any instructions you enter. To quit the session , type
end.
- To execute RATS in batch mode in UNIX:
rats first.prg first.out
- the output of the program first.prg is stored
in first.out
rats first.prg
- the output is displayed to the terminal
- The UNIX version do not include a built-in editor and on-line
help like the DOS version. If you need more help, the RATS manuals are
available to be signed out in Dunning 331 from Julie. There is no specific
RATS manual for UNIX as the commands are the same as for the PC version.
- UNIX RATS creates graphics files in its own RGF (Version 4.30)
format. This RGF format is incompatible with previous versions. The
UNIX RGF files can be downloaded, as binary files, to a personal
computer for viewing and printing using the current DOS RATS386 (Version
4.20) GRAFEDIT program. Warning: There will be an error message and
a core file whenever there is an "open plot graph.rgf" statement in the
program. Further, don't execute the open plot statement interactively.
I just could not exit to the UNIX prompt. My recommendation is to execute
the batch program. Then, delete the core file (a garbage file). I have no
problem of viewing the UNIX rgf file from my DOS rats386 grafedit utility.
-
The alternative solution for UNIX user is to print the graphics file using
PostScript printer by.
converting the GSP graphics files to PostScript format on qed using
the program rgf2pst. The program expects an input and
output file name as
arguments on the command line. The input file is a graphics file created
by RATS, and the output file will contain the equivalent PostScript code.
For example the command:
rgf2pst graph.rgf graph.pst
It will create a PostScript file graph.pst which you can now
print it QED PostScript printer only in DUN 211 or for viewing on a
PostScript previewer using
ghostviewer. Also, there is a brief information about this
viewer in my
Econ 815 Course Page
DOS RATS386
- To execute RATS in batch mode in DOS:
rats386 first.prg, first.out
- the output of the program first.prg is
stored in first.out , you need to put a comma between
first.prg and first.out
rats386 first.prg
- the output is displayed to the terminal
- Do not type RATS in dos prompt as this is a PC
RATS version which is a limited version for 386 machine users! Type
RATS386 for the full version of the software.
- To execute RATS in interactive mode in DOS, type rats386 at
DOS prompt
c:\> rats386
The following screen appears:
click here to View the full screen
- DOS RATS386 will start a RATS386 editor window named
NONAME00.PRG{io} automatically. This window is being called
NEW from the FILE menu. Unlike UNIX RATS, there is no
? prompt in that window, you just type in commands and DOS RATS386
will exceute any instructions whenever you hit Enter key.
- The "{io}" notation in the NONAME00.PRG{io} of the window
indicates that this window is both the "input" window and the "output"
window. This means that we can execute instructions in this window, and
that RATS will display any output generated by those instructions to this
same window. You also have the option of using separate windows for input
and output.
The following screen appears:
click here to View the full screen
- An alternative option is that you can select Local from the
bottom menu Ready/Local using mouse or by hitting CTRL + L
key simultaneously, you can type in commands in block, RATS will not
execute the commands even when you hit Enter key in order to go to
next line as you are in Local mode. After finishing typing, you
have to go back to Ready by selecting the bottom menu
Ready/Local using mouse or by hitting CTRL + L again. Now,
you can use mouse to select the block of commands and hit Enter key
or select Go from the bottom menu of the window. This option is
most convenient for loops.
- If you want to execute your own written program file instead, use
FILE menu to close the NONAME00.PRG{io} window and use
FILE menu to open your own written program file. The DOS RATS386
has convenient features in both top and bottom menus of the window. For
more advanced tips of using those windows, please drop by my office hours
at DUN 350 (WED 10:00 - 11:30 am and THUR 11:30 - 1:00 pm).
- DOS RATS386 has the nice GRAFEDIT and RATSDATA utility programs. The
DOS RATS (Version 4.20, newer version) store the graphic file in its own
RGF format, not the GSP format (Version
4.10 or older, UNIX). You can print this RGF format using laser / bubble
jet printers or even DOT MATRIX (24-pin, I am not sure about the printer
in DUN 350) printer from GRAFEDIT program. In addition, GRAFEDIT has the
option of exporting its RGF graph format into LOTUS 123 (PIC
format), HPGL (PLT format), and POSTSCRIPT (EPS format). My recommendation
is Lotus PIC file because it can be exported easily to Microsoft Word,
Excel, WordPerfect or Corel Draw for advanced publishing quality of
graphs.
- RATSDATA utility can transform spreadsheet, ascii or Dbase data format
files into RATS own data format file (*.rat) or vice versa.
- There is an excellent on-line help in DOS RATS386.