System-Defined Macros

List of System-Defined Macros

System-Defined Macros

Macro

Description

%vf_depVarTSMODEL

Declares the dependent variable for PROC TSMODEL. For more details, see Declaring Variables.

%vf_indepVarsTSMODEL

Declares the independent variables for PROC TSMODEL. For more details, see Declaring Variables.

%vf_varsTSMODEL

Declares both the dependent variable and independent variables for PROC TSMODEL. For more details, see Declaring Variables.

%vf_addXTSMODEL (tsdf)

Adds independent variables to the ATSM package data frame in PROC TSMODEL. For more details, see Adding Independent Variables to the Time Series Data Frame Object.

%vf_addEvents(tsdf, eventsObj)

Declares and adds event specification to the ATSM package data frame and event object in PROC TSMODEL. For more details, see Adding Event Specifications.

%vf_promoteCASTable(localCASTable = , globalCASTable = )

Promotes a local CAS table to a global CAS table. For more details, see Promoting a Local CAS Table.

%vf_setObjectOptions(instance=diagnose,object=diagnose)

%vf_setObjectOptions(instance=forecast,object=foreng)

Returns the options declared for the DIAGNOSE and FORENG instances, based on the user settings.

Macros: Details and Examples

Declaring Variables

The %vf_varsTSMODEL macro generates the VAR statements of the PROC TSMODEL to define the dependent and independent variables. It combines the statements that are generated by the %vf_depVarTSMODEL and %vf_indepVarsTSMODEL macros. The statements also include the ACC= and SETMISS= settings for the corresponding variables. For example, when there is one dependent variable, y, and two independent variables, x1 and x2, the macro generates the following statement:

var y /acc=SUM setmiss=MISSING;
var x1/acc=AVG setmiss=AVG;
var x2/acc=AVG setmiss=FIRST;

Adding Independent Variables to the Time Series Data Frame Object

The %vf_addXTSMODEL macro generates an addX function call of the Time Series Data Frame(TSDF) object from the Automatic Time Series Modeling (ATSM) package for all the independent variables. The following example shows the use of the %vf_addXTSMODEL macro.

declare object dataFrame(tsdf);
%if "&vf_indepVars" ne "" %then %do;
%vf_addXTSMODEL(dataFrame);
%end;

Adding Event Specifications

The %vf_addEvents macro adds event specifications of the TSDF object and the event object from the ATSM package. The following example shows the use of the %vf_addEvents macro.

declare object dataFrame(tsdf);
%if "&vf_inEventObj" ne "" or "&vf_events" ne "" %then %do;
declare object ev1(event);
rc = ev1.Initialize();
%vf_addEvents(dataframe, ev1);
%end;

Promoting a Local CAS Table

The %vf_promoteCASTable macro promotes a local CAS table to the global level. If you want to make any table other than the system-defined output tables available for further use, you need to use the %vf_promoteCASTable macro to promote them.

Last updated: March 16, 2026