View source: R/e_lm_bestsubset.R
e_lm_bestsubset | R Documentation |
Best subset selection returns results sorted by BIC
e_lm_bestsubset(form, dat, nbest = 5)
form |
lm formula for full model |
dat |
data to use |
nbest |
number of models to return for each model size, default is 5 |
tibble (data.frame) of selection results
## Not run:
tab_best <-
e_lm_bestsubset(
form = stats::formula(mpg ~ cyl + disp + hp + gear)
, dat = erikmisc::dat_mtcars_e
)
op <- options(); # saving old options
options(width=100) # setting command window output text width wider
tab_best |> print(n = Inf, width = Inf)
options(op); # reset (all) initial options
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.