R: Prediction Function for Objects of the 'StratSel' Class
predict
R Documentation
Prediction Function for Objects of the StratSel Class
Description
Prediction function for objects of the StratSel class. Provides either predictions for all observations in a model or for a specified profile. In addition, the function will either predict an outcome or three probabilities (indicating the probability for each outcome).
Usage
## S3 method for class 'StratSel'
predict(object, prob = FALSE, profile, ...)
Arguments
object
An object of class StratSel.
prob
Logical. If prob=TRUE the function will compute the predicted probabilities for each of the three possible outcomes. Default is prob=FALSE.
profile
Vector. A vector defining a specific profile for which the prediction is made.
...
...
Value
Either a matrix with dimension n * m, where there are n observations in the original model and m is three (for the three possible outcomes) or it will be a vector with n elements indicating for each observation which the most likely outcome would be.