Learn R Programming

smallstuff (version 1.0.3)

lmSub: Best Linear Model in Subset Selection

Description

Produces the best linear model for a specific number of predictors in a subset selection.

Usage

lmSub(object, d)

Value

The best linear model with d predictors

Arguments

object

An object of type "regsubsets"

d

Number of data predictors

Examples

Run this code
subs=leaps::regsubsets(mpg~.,mtcars)
summary(lmSub(subs,3))

Run the code above in your browser using DataLab