treeRegPredict
Compute Predictions for a Regression Tree Model from Spotfire

Description

Computes predictions for a regression tree model from Spotfire using the data in newdata. This function is not intended to be called by the user.

Usage

treeRegPredict(modelObj, newdata, origPredNames, newPredNames)

Arguments

modelObj an object of class "arbor".
newdata a data frame to use for the predictions. It must contain columns with names newPredNames.
origPredNames a single character string containing the predictor variables used in modelObj. The values must be tab delimited.
newPredNames a single character string naming the predictor variable in newdata. This is often the same as origPredNames. The values must be tab delimited.

Details

This function gets invoked when predictions for a regression tree model are requested in Spotfire.
Value
a data frame containing the predictions.
See Also
treeRegFit, treeRegEvaluate, arbor
Examples
ztree <- treeRegFit(ozone ~ wind + temperature, data=Sdatasets::air,
    modelName="treeExample")
predNamesString <- ztree$fitSummaryTable[2, 1]
predNames <- strsplit(predNamesString, "\t", fixed=TRUE)[[1]]
ap <- Sdatasets::air[1:20, predNames]
zPred <- treeRegPredict(ztree$modelObj, newdata=ap,
    predNamesString, predNamesString)
Package SpotfireStats version 6.1.1-7
Package Index