BRPREDICT procedure

Makes predictions using a regression tree (R.W. Payne).


Options

PRINT = strings
Controls printed output (prediction, transcript); if PRINT is unset in an interactive run BRPREDICT will ask what you want to print, in a batch run the default is pred

TREE = tree
Specifies the tree

PREDICTION = variate
Saves the prediction for the observations

TERMINALNODE = variate
Saves numbers of the terminal nodes from which the predictions were obtained


Parameter

X = variates
Observed values of the x-variates


Description

BRPREDICT makes predictions using a regression tree, as constructed by the BREGRESSION procedure. The tree can be saved from BREGRESSION (using the TREE option of BREGRESSION), and specified for BRPREDICT using its own TREE option. Alternatively, BRPREDICT will ask you for the identifier of the tree if you do not specify TREE when running interactively.

   The x-values for the predictions can be specified in the variates listed by the X parameter. These must have identical names to those used originally to construct the tree. If you do not set X when running interactively, BRPREDICT will ask you to supply the relevant x-values in turn, as required by the tree.

   The PRINT option controls printed output, with settings:

    prediction
prints the predictions obtained using the tree;

    transcript
prints the x-values supplied in response to questions in an interactive run.

If you do not set PRINT in an interactive run, BRPREDICT will ask what you would like to print. In batch, the default is to print the predictions.

   The PREDICTION option allows you to save the predictions (in a text), and the TERMINALNODE option allows you to save a variate containing the numbers of the terminal nodes reached in the tree to provide the predictions.

 

Options: PRINT, TREE, PREDICTION, TERMINALNODE.

Parameter: X.


Method

BRPREDICT works its way through the tree using the standard tree functions, BNBRANCHES and BNEXT.


Action with RESTRICT

BRPREDICT takes account of any restrictions on the X variates.