経済学書専門出版 エコノミスト社
Top書籍情報計量経済・統計ソフトウェアRATSDefining Your Data Set
ファイナンス大系
リアルオプション
Excelとその応用
統計学大系
経済学大系
e-ビジネス
計量経済学
ゲーム理論
経済数学
環境問題・環境経済学
人口学講座
ナレッジマネジメント
ビジネス書
NLP理論
複雑系経済学
経営学・商学大系
マーケティング
心理学・行動科学大系
金融工学・数理ファイナンス
マクロ経済学
法情報学
企業法学講座
経営工学大系
計量経済・統計ソフトウェア
オペレーションズ・リサーチ
会計学・簿記・税務
楽しい数学
時系列分析ソフトウェア
RATS

3-1. RATS Basics: Defining Your Data Set


In our example program, we want to read in some data, create a couple of new series, run some OLS regressions, and compute forecasts. The first step in any program that uses data series is to describe the data set to RATS, using the instructions CALENDAR and ALLOCATE.

CALENDAR sets the dating scheme and specifies the starting date for the data. ALLOCATE sets the default length of the data series (the CALENDAR instruction is omitted when using cross-sectional data).


Our Example Program
We'll be working with a short annual dataset, which begins in 1922 and runs through 1941, so we start with the following instructions:

CALENDAR 1922
ALLOCATE 1941:1

The first line tells RATS that we'll be using annual data starting in 1922. The second line indicates that 1941 is the default ending period for our data. Date references in RATS take the form of year:period (for annual, monthly, quarterly data) or year:month:day (most other frequencies). For annual data, the period value is always 1, since there is only one period per year.


Other Frequencies
RATS supports virtually any time series frequency, including annual, semi-annual, monthly, quarterly, weekly, and daily, as well as panel data (pooled cross section time series data) and daily data with multiple observations per day. Here are a few other CALENDAR and ALLOCATE examples:

Monthly data, from February, 1965 through December, 1995:

CALENDAR 1965 2 12
ALLOCATE 1995:12

Daily data (Mondays through Fridays only), from January 2nd, 1995 through December 29th, 1995:

CALENDAR(DAILY) 1995 1 2
ALLOCATE 1995:12:29


As above, but seven days per week:

CALENDAR(SEVENDAY) 1995 1 2
ALLOCATE 1995:12:29


Data with 24 periods per year, starting in 1950:

CALENDAR 1950 1 24
ALL 1995:24


←3. RATS Basics →3-2. Reading In Data


←RATSのTopページに戻る