RATS 10.1
RATS 10.1

STORE( options )  list of series to store on data file

Stores the listed series on the RATS data file being edited (see DEDIT). If you STORE a series already on the data file, the original contents will be replaced. INCLUDE stores series one at a time with more control over options. The instruction COPY(FORMAT=RATS) can be used as an alternative to STORE when you are creating a new RATS format file from data in working memory.

 

With the CONVERT option, STORE reads data from the specified RATS I/O unit and stores it on the RATS file.

Wizard

You can use File—Open to open RATS format files, and then drag and drop series from the Series List Window to the file or use File—Import... to import data into the file. See RATS Data Files for details.

Parameters

list of series...

RATS stores the listed series on the data file. If you have not set a SMPL, STORE will use the defined range of each individual series. Omit this list if you use the CONVERT option.

Options (these apply only to file conversions):

CONVERT=BINARY/CSV/CITIBASE/DBF/DIF/DRI/DTA/FAME/FRED/HAVER/MATLAB/ODBC/PORTABLE/PRN/RATS/TSD/WF1/WKS/XLS/XLSX [unused by default]

REFRESH/[NOREFRESH]

CONVERT indicates the format of the source file for the data you are converting. The files must be organized as described in "Dealing with Data". Omit the list of series when using this option. CONVERT normally copies all of the series on the source file. With REFRESH, RATS updates only those series which already exist on the file being edited.

 

REQUEST=VECT[STRINGS] with the database names to include

This applies to the CONVERT option and is mainly designed for data formats such as FRED, FAME or HAVER that have too many series to import in their entirety (or may have no option to run through the entire catalog anyway). You create a VECT[STRINGS] with the names that you want, and STORE will pull them off the data base (if they're present) and add them to the file being edited. See the example below.

 

UNIT=[DATA]/INPUT/other unit

This specifies the source I/O unit for the data you are converting. RATS will read the series from this unit, and store them on the RATS format file. Usually, this will just be the default setting of UNIT=DATA.

 

ORG=[ROWS]/COLUMNS

For spreadsheet-style formats, ORG=COLS is for a worksheet with the series running down columns, while ORG=ROWS is for a worksheet with series running across rows. Note: The older VARIABLES and OBSERVATION arguments for this option are still supported. See Organization Option

 

SHEET="worksheet name" [unused]

When converting data from an Excel workbook with multiple worksheets or a MATLAB file with several data series on a single matrix, you can use the SHEET option to specify which is to be processed. If SHEET is not specified, RATS reads data from the first worksheet on the file.

 

SKIPLINES=number of top lines to skip [0]

TOP=top line to process [1]

BOTTOM=top line to process [last]

LEFT=leftmost column to process [1]

RIGHT=rightmost column to process [last]

You can use these if you have comments or other non-data information on a text or spreadsheet file. SKIPLINES or TOP can be used to skip over information at the top of the file, and the others can be used to prevent reading marginal comments at other locations.

 

SQL="SQL string"

Used with FORMAT=ODBC, this allows you to connect to a database and read data using SQL commands.

 

[ADDDATES]/NOADDDATES

For XLS, XLSX, DIF, PRN, WKS, ODBC and DBF only. If there are dates on the file, STORE will transfer them to the RATS format file. If there are none, however, you can still attach dates to the series by using a CALENDAR instruction (before the STORE). The CALENDAR tells RATS the date of the first observation on the file and the data frequency. NOADDDATES is only necessary in the rare instance that you have used a CALENDAR instruction, but want to save the series as undated.

 

DATEFORMAT="date format string"

This can be used if dates on the file are text strings in a form other than year (delimiter) month (delimiter) day. In the date format string, use y for positions with the year, m for position with the month and d for positions with the day. Include the delimiters (if any) used on the file. Examples are DATEFORMAT="mm/dd/yyyy" and DATEFORMAT="yyyymmdd"

 

MISSING=code (numeric) for missing values

With the MISSING option, any observations of the source data which are equal to code (-999, for example) are stored as missing values on the RATS format file.

 

LIKE=template string for variables to copy

This allows you to use templates with * or ? wildcard characters to include series that match the template. For example, LIKE="X*" would convert all series whose names begin with "X", while LIKE="X?" would only convert series whose names are two characters long, with X being the first character.

Usage

To use STORE, you must first open a RATS format data file for editing using DEDIT. Be sure to do a SAVE after the STORE to put the changes out to the file. To use STORE with CONVERT, you also need to OPEN the unit with the data.

Examples

dedit(new) gbrdata.rat

open data gbrdatacopy.xls

store(convert=xls,org=columns)

save
 

This converts the content of the file gbrdatacopy.xls and adds it to the new RATS format file gbrdata.rat.


 

dedit(new) rra1.rat

store $

  resptaxl respgcnl respgdpl $

  uppertaxl uppergcnl uppergdpl $

  lowertaxl lowergcnl lowergdpl

save

 

This adds the nine listed series to the new RATS format file rra1.rat.

 


 

dec vect[series] nhsseries(7)

input nhsseries

NHSUSSP15T19

NHSUSSP20T29

NHSUSSP30T39

NHSUSSP40T49

NHSUSSP50T74

NHSUSSP75O

NHSUSSPU15

*

dedit(new) housesales.rat

store(convert=fame,request=nhsseries)

save

 

This creates a RATS format file housesales.rat with seven housing sales series taken from FRED.


 


Copyright © 2025 Thomas A. Doan