Creating Project Input and Output Tables

Create a Project Input Table

You can create a project input table either from the train table that you used to develop your model, or you can define the project variables in a DATA step. The project input table must include the input variables that are used by the champion model. Therefore, if you have several candidate models for your project, make sure that all candidate model input variables are included in the project input table. If you create the project input table from the train table, be sure to exclude the target variable from the project input table.
Here is one method that you can use to create the project input table from the train table. Use the SET statement to specify the train table and the DROP or KEEP statements to specify the variables from the train table that you want in the project input table. You can drop the target variable or keep all variables except the target variable.
This DATA step creates the project input table from the train table and drops the target variable Bad:
data hmeqtabl.invars;
   set hmeqtabl.training (obs=1);
   drop bad;
run;
This DATA step creates the project input table from the train table and keeps all variables except for the target variable Bad:
data hmeqtabl.invars;
   set hmeqtabl.training (obs=1);
   keep mortdue reason delinq debinc yoj value ninq job clno derog clag loan;
run;
You can also create the project input table using the LENGTH statement to specify the variables and their type and length. You could also specify the LABEL, FORMAT, or INFORMAT statements, or the ATTRIB statement to specify additional variable attributes. The following DATA step uses the LENGTH statement to specify the project input variables in the table:
data hmeqtabl.invars;
   length mortdue 8 reason $7 delinq 8
          debinc 8 yoj 8 value 8
          ninq 8 job $7 clno 8 derog 8
          clag 8 loan 8;
run;
If you find that you need to modify the project input variables after you have created a project input table, you can use the project’s Variables page to modify the project variables. For more information, see Defining Project Input and Output Variables.

See Also

SAS 9.4 Statements: Reference
SAS 9.4 Language Reference: Concepts

Create a Project Output Table

You can create a project output table either from the train table that you used to develop your model, or you can define the project variables in a DATA step. The project output table includes only output variables that are created or modified by the champion model. Therefore, if you have several candidate models for your project, you must make sure that all project output variables are mapped to the champion model output variables.
To create the project output table using the training table, use the SET statement to specify the training table, and use the KEEP statement to specify the variables from the training table that you want in the project output table. The following DATA step creates the project output table Hmeqtabl.Outvars:
data hmeqtabl.outvars;
   set hmeqtabl.training (obs=1);
   %include "c:\temp\score.sas";
   keep score;
run;
The following DATA step creates the same project output table using the LENGTH statement to specify the output variable and its type and variable length:
data hmeqtabl.outvars;
   length score 8;
run;
If you find that you need to modify the project output variables after you have created a project output table, you can use the project’s Variables page to modify the project variables. For more information, see Defining Project Input and Output Variables.
Last updated: February 22, 2017