Description Usage Arguments Details Value Author(s) See Also Examples
This function inputs a table of models produced by scoremods
, picks out the best models according to a specified information criterion, and (optionally) generates a graphical representation of these models.
1 2 3 4 5 |
tbl |
a table of the kind outputted by |
ic |
the information criterion used to score the models. By default, this is |
nmods |
maximum number of lowest-scoring models to retain. |
plot |
logical value indicating whether to plot the criterion values for the best models. |
labels |
labels for the predictors, used along the horizontal axis of the plot. |
cex.axis, las, xlab, ylab, main |
graphical parameters for the plot; see |
... |
additional graphical parameters passed to |
Only models with criterion value equal to or less than that of the null (intercept-only) model are retained, even if there are fewer than nmods
such models. If the null model is among the best nmods
models and
plot = TRUE
, the plot includes a dotted line representing the null model.
The defaults for las
and labels
are intended to
make the horizontal axis look sensible, whether or not names for
the predictors are provided in tbl
. See the example below.
A table consisting of the rows of tbl
referring to the models with lowest value of criterion ic
.
Philip Reiss phil.reiss@nyumc.org and Lei Huang huangracer@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 | data(swiss)
modtable = scoremods(swiss$Fertility, swiss[ , -1], nboot=100)
par(mfrow = 1:2)
bestmods(modtable)
# The predictor names may render the above table too wide to be
# read easily. To remove them, set names = 1:5 in the above call
# to scoremods. Alternatively, modify modtable as follows:
modtable.nonames = modtable
dimnames(modtable.nonames)[[2]][1:5] = 1:5
bestmods(modtable.nonames, main="Same, minus names")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.