BRVALUES procedure
Forms values for nodes of a regression tree (R.W. Payne).
Options
Parameter
Description
When pruning a regression tree, it is best to use "accuracy" figures that are derived from a different set or sets of data from that which was used to construct the tree. BRVALUES allows these to be calculated, together with predictions for the nodes of the tree.
The TREE option specifies the tree for which the values are to be formed. The Y option specifies the values of the response variate for the observations in the new data set, and the X parameter defines their values for the x-variates as used to construct the tree. You can set option REPLACE=yes to use the new values to replace those already stored in the tree. Alternatively, you can use the PREDICTION parameter to save the predictions, in a pointer. This has an element for each node of the tree (and with the same suffix as that node) pointing to a scalar storing the prediction for the node. Similarly, the ACCURACY parameter saves the accuracies, and the NOBSERVATIONS parameter saves the numbers of observations at each node. You can use these later to replace the prediction and accuracy values in the original tree by
CALCULATE Tree[]['accuracy'] = ACCURACY[]
& Tree[]['prediction'] = PREDICTION[]
& Tree[]['nobservations'] = NOBSERVATIONS[]
Alternatively, you may want to combine them first with other estimates, for example to form bootstrapped estimates.
Options: Y, TREE, REPLACE, PREDICTION, ACCURACY, NOBSERVATIONS.
Parameter: X
Method
BRVALUES uses the standard GenStat tree functions to obtain the necessary information about the tree.
Action with
RESTRICT
BRVALUES takes account of any restrictions on the Y or X variates.