RATS 10.1
RATS 10.1

Dealing with Data /

Where Are Your Data Now?

Home Page

← Previous Next →

The suggestions below are designed to help you figure out the best approach to getting your data read into RATS so you can make use of them. Details on the various file formats supported by RATS are in "Data Formats".

In a Time Series Database

Except for FRED, these can all be read using the proper sequence of CALENDAR, OPEN DATA and DATA instructions. See RATS Format for more on the use of RATS format; otherwise, check the description of the format in the help.  Again, note that most of these are available only for the Professional level of RATS.

 

RATS, FRED, Fame and Haver DLX all have “browser” modes, which are Data File Windows. You can use that to navigate through the contents of the file, using the View—Reset List menu item or “Change Layout” toolbar icon () to restrict the list based upon frequency, start or end year, comments or names (or any combination). You can drag and drop series you select onto the Series Window, or onto a RATS Data File Window, or export them directly to some other type of file (such as a spreadsheet). You open the browser for a RATS data file by opening it with the menu File—Open; the other browsers are submenus for Data/Graphics—Data Browsers.

 

If you are working with the browser for a RATS file, you can also select the series you want and use the Data (RATS Format) Wizard. That will look at the ranges and frequencies of the series that you selected, and come up with a common data range.

 

In a Labeled Table

These are all included in the Data/Graphics—Data (Other Formats) Wizard, which we would recommend you use the first time you try to work with a particular file. The wizard will always read all the series from the file, which might not be what you want. However, you can always edit the DATA instruction produced by the wizard to eliminate the unwanted series. Save the edited program file, and use that as the basis for further work.

 

See "Spreadsheet and Delimited Text Formats" and the next paragraph for more on the “spreadsheet” formats (XLS, XLSX, WKS, DIF, PRN). Because there are many ways to pull data out of these, when you use them as a Labeled Table, you need to include the option ORG=COLUMNS

 

In a (Less Structured) Spreadsheet

Spreadsheets can often include additional information besides the data and labels (and possibly dates) that are required for treatment as a Labeled Table. If you have a well-structured labeled table within the spreadsheet, you probably can read it as a Labeled Table by using the LEFT and TOP options to restrict the attention of the DATA instruction to the area that you want. For instance, if you have ten lines of descriptive headers, you would add the option TOP=11. The Data (Other Formats) Wizard can help you set those options.

 

If you have a properly labeled table, except that the series are arranged by rows, rather than columns, you can use the option ORG=ROWS. You can combine that with the TOP and LEFT options if needed to isolate the data table from other information. There are several other options for reading data out of less-structured spreadsheets which are covered in "Spreadsheet and Delimited Text Formats". Note, however, that in many cases, the simplest approach is simply to pull the data into a spreadsheet program and edit out the unwanted parts of it.

 

In a Text File

What you should do depends on the format that you have inherited and how big the data set is. If the data is a well-structured Labeled Table, you can just read it as described above.

 

If the file is fairly well-organized in columns and rows, but without series names, you can probably still process the file using the Data (Other Formats) operation. In most cases, you can just select “Text files (*.*)” as the file type. You’ll just have to provide labels for the series. If the data file is fairly stable, we recommend that you then write the data from RATS into a RATS format or spreadsheet format file for later use.

 

"Text Files" for more tips on reading text files.

 

In a Database File

If the data are in a database you can access using SQL commands, you should be able to read it with the Professional version of RATS, using DATA with FORMAT=ODBC. See the description of the FORMAT=ODBC.

 

On Paper

If you have quite a bit of data in printed form, you’re probably best off scanning it to create a text file, and continuing as described under “In a Text File.” Since character recognition software is still imperfect, you’ll have to be extra careful in checking that the data came in properly.

 

If you need to key in your data, you can:

type the data into a spreadsheet, a database application, or a text file (using RATS or any other text editor) and read the data using the steps described in the relevant section above.

Use the Data—Create Series operation and type the data directly into RATS memory, and then use File—Export....

Open or create a RATS format file (using File—Open or File—New), and then use Data—Create Series to type the data directly into a RATS format data file.

 

The RATS data editor used by the Create Series operation is designed to handle time-series data sets easily, where you deal with one series at a time. If your data set is more “case-oriented,” a spreadsheet or data base editor is likely to be more convenient, since you can edit across series.

 

Whatever method you use, be sure to check the data after reading it into RATS.


Copyright © 2025 Thomas A. Doan