predict.regsubsets {smallstuff} | R Documentation |
Obtain Predictions using Subset Selection
Description
Predict responses for the best model in a subset selection with a specific number of predictors.
Usage
## S3 method for class 'regsubsets'
predict(object, d, newdata, ...)
Arguments
object |
An object of type "regsubsets" |
d |
Number of data predictors |
newdata |
Dataset for which to predict responses |
... |
Additional arguments |
Value
A set of predicted responses for newdata
Examples
subs=leaps::regsubsets(mpg~.,mtcars,subset=1:25)
predict(subs,3L,mtcars[26:32,])
[Package smallstuff version 1.0.3 Index]