 Usage:  mssr = prederr (tr, x, y, type)  
 
 Input:

  tr                     list of vectors: data structure which represents a binary tree 
                         and is produced by cartsplit procedure, contains vectors 
                         tr.val, tr.vec, tr.mean, tr.ssr, tr.nelem. 
                         See cartsplit for the description of tr. 
                         
  x                      n x p vector: represents n points in the sample space 
                         at which the prediction of the regression tree will 
                         be calculated. 
                         
  y                      n x 1 vector: 
                         contains the values of the response variable. 
                         
  type                   p x 1 vector: 
                         contains the types of the original regression variables, 
                         1 means that the corresponding variable is continuous and 
                         0 that it is categorical. This vector should be similar to 
                         the vector which was given originally as an input to the 
                         cartsplit which produced the regression tree tr. 
                         
 Output:

  mssr                   real number >0: 
                         mean of the squared residuals, that is, 
                         sum of squared differences between predictions and 
                         observations, divided by the number of observations n. 
                         
--------------------------------------------------------------
(C) MD*TECH Method and Data Technologies, 17.8.2000
