plot.BranchGLMVS {BranchGLM} | R Documentation |
Plot Method for summary.BranchGLMVS and BranchGLMVS objects
## S3 method for class 'BranchGLMVS'
plot(
x,
ptype = "both",
marnames = 7,
addLines = TRUE,
type = "b",
horiz = FALSE,
cex.names = 1,
cex.lab = 1,
cex.axis = 1,
cex.legend = 1,
...
)
## S3 method for class 'summary.BranchGLMVS'
plot(
x,
ptype = "both",
marnames = 7,
addLines = TRUE,
type = "b",
horiz = FALSE,
cex.names = 1,
cex.lab = 1,
cex.axis = 1,
cex.legend = 1,
...
)
x |
a |
ptype |
the type of plot to produce, look at details for more explanation. |
marnames |
value used to determine how large to make margin of axis with variable names, this is only for the "variables" plot. If variable names are cut-off, consider increasing this from the default value of 7. |
addLines |
logical value to indicate whether or not to add black lines to separate the models for the "variables" plot. This is typically useful for smaller amounts of models, but can be annoying if there are many models. |
type |
what type of plot to draw for the "metrics" plot, see more details at plot.default. |
horiz |
whether models should be displayed horizontally or vertically in the "variables" plot. |
cex.names |
how big to make variable names in the "variables" plot. |
cex.lab |
how big to make axis labels. |
cex.axis |
how big to make axis annotation. |
cex.legend |
how big to make legend labels. |
... |
arguments passed to the generic plot and image methods. |
The different values for ptype are as follows
"metrics" for a plot that displays the metric values ordered by rank
"variables" for a plot that displays which variables are in each of the top models
"both" for both plots
This only produces plots, nothing is returned.
Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")
# Doing branch and bound selection
VS <- VariableSelection(Fit, type = "branch and bound", metric = "BIC", bestmodels = 10,
showprogress = FALSE)
VS
## Getting summary of the process
Summ <- summary(VS)
Summ
## Plotting the BIC of the best models
plot(Summ, type = "b")