| predict.htt {HTT} | R Documentation | 
Predictions from a Fitted htt Object
Description
Compute predictions from htt object.
Usage
## S3 method for class 'htt'
predict(object, newdata,
        type = c("response", "prob", "node"),
        ...)
Arguments
| object |  fitted model object of class  | 
| newdata | an optional data frame in which to look for variables with which to predict, if omitted, the fitted values are used. | 
| type |  a character string denoting the type of predicted value returned.
For  | 
| ... | additional print arguments. | 
Details
This function is a method for the generic function predict
for class htt. It can be invoked by calling predict for an
object of the appropriate class, or directly by calling predict.htt
regardless of the class of the object.
Value
A list of predictions, possibly simplified to a numeric vector, numeric matrix or factor.
If type = "response":
the mean of a numeric response and
the predicted class for a categorical response is returned.
If type = "prob":
the matrix of class probabilities
is returned for a categorical response.
If type = "node":
an integer vector of terminal node identifiers is returned.
See Also
Examples
irishtt <- HTT(Species ~., data = iris)
## the predicted class
predict(irishtt, type = "response")
## class probabilities
predict(irishtt, type = "prob")
## terminal node identifiers
predict(irishtt, type = "node")