Entry Number, Date, and Panel Data Functions |
RATS includes a perpetual calendar which is valid for dates from 1800 on. (Validity for historical data depends upon when the Gregorian calendar was adopted in a given area.) There are quite a few functions which allow you to make use of this. The first group of these analyze the date information for entries (E argument) in the current CALENDAR setting. A second group looks directly at year:month:day (Y,M,D arguments). Some of the functions take a day of the week as an argument, or return day of the week information. This is coded as 1=Monday to 7=Sunday.
The "Julian" functions are all based upon a day numbering scheme which starts at a theoretical extension of the Gregorian calendar back to Jan 1, 0001.
Default workspace length |
|
Entry number of specified date |
|
Returns the current CALENDAR setting |
|
Observance date for y:m:d (closest day of week) |
|
Observance date for y:m:d (closest Monday–Friday) |
|
Current date and time |
|
Date label for a given date/entry number |
|
Day of month for entry T |
|
Number of days in entry T |
|
Day of week for given date |
|
Dates after March 23rd for (Western) Easter |
|
Day of month for floating holiday |
|
Individual within a panel set |
|
Number of (theoretical) days from Jan 1, 0001 to entry T in the current CALENDAR scheme. |
|
Number of (theoretical) days from Jan 1, 0001 to the date coded as a real number like 19700530. |
|
Number of (theoretical) days from Jan 1, 0001 to the date described using separate year, month and day values. |
|
Month number (1–12) of entry T |
|
Size of panel data time dimension |
|
Size of panel data individual dimension |
|
Period within a panel set |
|
Ending entry of most recent regression |
|
Starting entry of most recent regression |
|
Today’s entry |
|
Number of occurrences of day D in period T |
|
Day of week of entry T |
|
Year number |
Copyright © 2025 Thomas A. Doan