|
Dealing with Data / Data formats / FORMAT=DBF |
This is a database format used by dBase and compatible programs. It's a Labeled Table format for both input and output of series.
RATS Instructions
|
data(format=dbf) |
read series from DBF into memory |
|
store(convert=dbf) |
copy series from DBF to RATS format |
|
copy(format=dbf) |
write series to DBF file |
|
prtdata(format=dbf) |
write series from RATS format file to DBF |
Interface Operations
Data Wizard
You can read series using Data/Graphics—Data (Other Formats).
Series Window and RATS Data File Window
You can import series using File—Import... or the
toolbar button. You can export series using File—Export..., the
toolbar button, or the Export operation on the contextual menu.
Details
The data are read from the file based upon the field (column) names. Each record is treated as a separate observation. If the file includes a date field as the first field, RATS will be able to make use of the date information to select a sub-sample, recognize skipped observations, or allow compacting or expanding to a different frequency. The dates can either use the DBF date field format, which codes dates as year/month/day, or be entered as a character field with the standard codings like “year:period”.
For writing data, each series that you write will be a field in the database. The dBase specification allows for at most ten characters in a field name, so longer names will be truncated. If you ask for dates, RATS will either include a date field (for daily or weekly data), or a character field with coded dates.
Example
This reads in several series of stock return data from a DBF file:
calendar(d) 1996:1:2
allocate 2009:12:31
open data stockdat.dbf
data(format=dbf)
Copyright © 2025 Thomas A. Doan