Time Series Analysis Package
FREQ Object
The FREQ class object function analyzes the frequency of a time series and outputs all unique values and corresponding counts for the time series.
Table 18 summarizes the methods that are associated with the FREQ object.
Table 18: Methods of the FREQ Object
Figure 11 diagrams the methods of the FREQ object.
Figure 11: FREQ Data Flow

FREQ Synopsis
DECLARE OBJECT obj (FREQ);
Method syntax, in order of typical usage:
rc=obj.SetY (YSeries);
rc=obj.SetOption ('Name',Value);
rc=obj.Run ();
rc=obj.GetResult ('Name',OutputArray);
rc=obj.Nvalues ();
FREQ Methods
FREQ.GetResult Method
rc=obj.GetResult ('Name',OutputArray);
Outputs the selected results to an array.
Input Arguments
You must specify the following input arguments:
- Name
-
specifies a string that identifies the result series to return. You can specify the following values within single quotation marks:
- 'VALUES'
retrieves a monotonically increasing list of the unique values that are found in the input series that is specified by using the SetY method.
- 'COUNTS'
retrieves the number of occurrences of each unique value.
- 'PCTS'
retrieves the percentage of total occurrences of each unique value.
- OutputArray
specifies a numeric array to receive the result series.
FREQ.Initialize Method
rc=obj.Initialize ();
Initializes an FREQ object to an empty state. This method must be called before the time series arrays and other attributes are specified for the FREQ object.
Arguments
There are no arguments associated with this method.
FREQ.Nvalues Method
rc=obj.Nvalues ();
Returns the number of unique values in the input series to rc. This number is also the length of all result series that are returned by the GetResult method. It is set to a missing value if the Run method did not complete successfully.
Arguments
There are no arguments associated with this method.
FREQ.Run Method
rc=obj.Run ();
Runs the FREQ object to perform the autocorrelation and autocovariance analysis by using the time series array YSeries that has been specified for it. Upon successful completion, various results can be extracted from the FREQ object.
Input Arguments
You can specify the following for 'Name' and its associated Value:
- 'SEASONALITY'
specifies the seasonality of the time series, where Value is an integer. You can also specify _SEASONALITY_. The predefined symbol _SEASONALITY_ is the length of the seasonal cycle that is computed by using the seasonality or the time ID interval that you specify in a PROC TSMODEL step or a
runTimeCodeaction call. For more information about predefined symbols, see the section "Predefined Symbols" in Chapter 16, TSMODEL Procedure (SAS Visual Forecasting: Forecasting Procedures). For more information about seasonality, see the section "Seasonality in Models" in Chapter 17, Forecasting Details (SAS Visual Forecasting: Time Series Packages). The default value is 0.