View source: R/predict.gic.DMR.R
predict.gic.DMR | R Documentation |
Makes predictions from a gic.DMR
object (for the model with minimal GIC).
## S3 method for class 'gic.DMR'
predict(object, newx, type = "link", unknown.factor.levels = "error", ...)
object |
Fitted |
newx |
Data frame of new values for |
type |
One of: |
unknown.factor.levels |
The way of handling factor levels in test data not seen while training a model. One of |
... |
Further arguments passed to or from other methods. |
Similar to other predict
methods, this function predicts fitted values from a fitted gic.DMR
object for the model with minimal GIC.
Vector of predictions.
data(miete)
ytr <- miete[1:1500,1]
Xtr <- miete[1:1500,-1]
Xte <- miete[1501:2053,-1]
m <- DMR(Xtr, ytr)
g <- gic.DMR(m, c = 2.5)
ypr <- predict(g, newx = Xte)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.