View source: R/predict.StratSel.R
| predict | R Documentation |
StratSel Class
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).
## S3 method for class 'StratSel'
predict(object, prob = FALSE, profile, ...)
object |
An object of class |
prob |
Logical. If |
profile |
Vector. A vector defining a specific profile for which the prediction is made. |
... |
... |
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.
Lucas Leemann lleemann@gmail.com
data(data.fake)
out1 <- StratSel(Y ~ var.A + var.B | var.C + var.D | var.E + var.C, data=data.fake, corr=FALSE)
predict(out1)
predict(out1, prob=TRUE)
predict(out1, profile=c(1,0.2,0.2,1,0.2,0.2,1,0.2,0.2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.