Description Usage Arguments Value Examples
Obtains clusters, predictions, or residuals from a fitted qrmix object.
1 2 |
object |
a fitted object of class |
newdata |
optional data frame for which clusters, predictions, or residuals will be obtained from the qrmix fitted object. If omitted, the training values will be used. |
type |
the type of prediction. |
... |
other argumets passed to other methods. |
A vector with predicted clusters, responses, or residuals, depending on type
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(blood.pressure)
set.seed(8)
sampleInd = sort(sample(1:500, 400))
bpSample1 = blood.pressure[sampleInd,]
bpSample2 = blood.pressure[-sampleInd,]
mod1 = qrmix(bmi ~ ., data = bpSample1, k = 3)
#Cluster assigned to the training values
predict(mod1)
#Residuals corresponding to the response predicted values from mod1 for new data
predict(mod1, newdata = bpSample2, type = "residuals")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.