The FORECAST statement computes predicted values, measures of precision, and confidence limits for observed and future (forecast) values of a time series.
specifies the name of the SAS datetime variable to use.
specifies the libref and table name of a SAS data set when you specify the DATA= option. The data set must contain the timestamp variable and one or more of the analysis variables. The procedure then sends these values to the server to request the forecast calculation.
specifies the aggregators on which the ordering of the result set is based. The following aggregators are valid:
CSS | corrected sum of squares |
CV | coefficient of variation |
MAX | maximum value |
MEAN | arithmetic mean |
MIN | minimum value |
N | number of observations |
PROBT | p-value for the t-statistic |
STD | standard deviation |
STDERR | standard error |
SUM | sum of the nonmissing values |
TSTAT | t-statistic for the null hypothesis that the mean equals zero |
USS | uncorrected sum of squares |
VAR | sample variance |
forecast ts / vars =(expenses revenue) aggregate=(sum mean);
Interaction | This option has no effect if you specify a data set with the DATA= option. |
specifies the format for the time stamp variable. If you do not specify the FORMATS= option, the default format is applied for the time stamp variable.
Interaction | This option has no effect if you specify a data set with the DATA= option. |
specifies how to compose the main result table. The default is FRAME=BOTH and the result set contains the observed series (the history) as well as the forecast (the horizon). If you specify FRAME=LEAD (or FRAME=HORIZON), then only the future values are returned. You can control the length of the horizon with the LEAD= option.
Alias | WINDOW= |
Default | BOTH |
specifies the machine to which you want to connect to produce the forecast when you specify the DATA= option in the FORECAST statement. If you do not specify the host information, it is determined from the active table.
specifies to use the server that is listening on that port to produce the forecast when you specify the DATA= option in the FORECAST statement. You can use this option with the HOST= option to use a specific server. If you do not specify a PORT= value, the behavior of the FORECAST statement depends on whether a table is active. If there is no active table, then the IMSTAT procedure tries to connect to the server using the LASRPORT macro variable. If a table is active, then a connection is made to the server that has the active table.
specifies the independent variables used in automatic modeling. When you specify one or more independent variables, the server performs model selection and determines the best-fitting time series model and the important independent variables. If any variables are selected, a table is generated to show the actual and predicted values for each variable. Specify the INFO option to view the Forecast Information table that displays the selected time series model.
Alias | INDEPVARS= |
specifies to display a forecast information table for each analysis variable. Each table provides informational details about the forecast. For example, you can learn from this table what time units were applied and which method was used to compute the forecast.
specifies the forecast horizon (in number of time intervals).
Default | 12 |
Interaction | This option has no effect if you specify a data set with the DATA= option. |
specifies to prevent the procedure from pre-parsing and pre-generating code for temporary expressions, scoring programs, and other user-written SAS statements.
Alias | NOPREP |
Interaction | This option has no effect if you specify a data set with the DATA= option. |
specifies a hard limit for the number of time stamps. If that number reaches m, then execution stops and the server generates an error message. This option is useful to protect against the generation of very large result sets. You can also limit the number of time stamps used in the forecast with the TAIL= option. Using the TAIL= option also reduces the size of the result set.
saves the result table so that you can use it in other IMSTAT procedure statements like STORE, REPLAY, and FREE. The value for table-name must be unique within the scope of the procedure execution. The name of a table that has been freed with the FREE statement can be used again in subsequent SAVE= options.
specifies the number of most recent time intervals on which to base the estimation of the predicted and forecasted values. The TAIL= option enables you to restrict the length of the series that is used in the forecast.
Interaction | This option has no effect if you specify a data set with the DATA= option. |
specifies either a quoted string that contains the SAS expression that defines the temporary variables or a file reference to an external file with the SAS statements.
Alias | TE= |
specifies the list of temporary variables for the request. Each temporary variable must be defined through SAS statements that you supply with the TEMPEXPRESS= option.
Alias | TN= |
specifies one or more numeric analysis variables to forecast. If you do not specify the VARS= option, a forecast is produced for all numeric variables in the active table. If you specify a data set with the DATA= option, you must specify the analysis variables in the VARS= option. If you do not, the server generates an error.
Alias | DEPVARS= |