FREQ

Examples

FREQ sets the frequency for the series in your TSP run. It may be changed during the course of a TSP run, but series of different frequencies cannot be mixed in the same command (see CONVERT for an exception to this rule). The PANEL options are used to interpret any FREQ N series as panel (time series-cross section) data, that is to tell TSP how to identify one individual from the next. These options are used by any subsequent TSP commands which support panel data, such as PANEL, AR1, and PRINT.

FREQ NONE or ANNUAL or MONTHLY or QUARTER or WEEKLY;

or

FREQ value ;

or

FREQ (PANEL, ID=ID series, T=value, N=value, TIME=series, START=date)

             N or A or Q or M or W or value ;

Usage

FREQ is very simple: FREQ followed by one of the choices above. Single letter abbreviations are allowed.

The annual, monthly, quarterly, and weekly frequencies imply one, 12, 4, or 52 periods per year respectively. The year is assumed to be base 1900 if it has two digits or base 0 if it has four. You can reset the base using the BASEYEAR= option (see the OPTIONS command entry for details). The format of dates in TSP is always YYYY:PP where YYYY is the year and PP is the period. PP can be any number between 1 and the frequency. The period is suppressed when the frequency is annual. The weekly frequency assumes exactly 52 weeks per year and CONVERT's to quarterly but not to monthly. (TSP does not have a calendar.) If the frequency specified is a number, it represents the number of periods per year.

The default frequency is none. This frequency is provided for convenience in dealing with non-time series data; the data are assumed to be numbered from observation one, unless you specify the sample otherwise.

Output

The scalar variable @FREQ is stored, with the value of the current frequency. This variable can be used to restore a frequency and sample by a PROC. For example,

COPY @SMPL SMPSAV; COPY @FREQ FRQSAV;

can be used at the start of the PROC, and

FREQ FRQSAV; SMPL SMPSAV;

can be used at the end.

Examples

FREQ A ;

SMPL 1890 1920 ;

specifies data with annual frequency running from 1890 to 1920.

FREQ QUARTER ;

SMPL 47:1 82:4 ;

specifies data with quarterly frequency running from the first quarter of 1947 to the fourth quarter of 1982.

FREQ 26 ;

specifies data with a biweekly frequency.

FREQ (PANEL,T=5) ;

specifies balanced panel data with 5 observations for each individual, and no particular time series frequency.

FREQ (PANEL,ID=CUSIP,START=1974) A;

specifies possibly unbalanced panel data with an ID series CUSIP that distinguishes each individual, and annual data starting in 1974 for each individual.