| plotSubset | R Documentation |
This function plots various information criteria and model fit statistics
against the number of terms or the adjusted R-squared, depending on the type
of plot selected. It helps in model selection by visualizing different
aspects of model performance. Models which did not pass the consistency
check are depicted with an empty circle; the automatically selected model is
highlighted in red. If BIC-weighted model averaging was applied
(averaging = TRUE), a caption indicates that the final coefficients
are a weighted combination of the consistent candidate models shown.
plotSubset(model, type = 0)
model |
The regression model from the bestModel function or a cnorm object. |
type |
Integer specifying the type of plot to generate:
|
The function generates different plots to help in model selection:
- For types 1 and 2 (Mallows's Cp and BIC), look for the "elbow" in the curve where the information criterion begins to drop. This often indicates a good balance between model fit and complexity. - For type 0 (Adjusted R2), higher values indicate better fit, but be cautious of overfitting with values approaching 1. - For types 3 and 4 (RMSE and RSS), lower values indicate better fit. - For type 5 (F-test), higher values suggest significant improvement with added terms. - For type 6 (p-values), values below the significance level (typically 0.05) suggest significant improvement with added terms.
The F-tests and p-values compare each model with the preceding (smaller) one, with degrees of freedom based on the actual difference in the number of parameters. After consistency screening, consecutive models may differ by more than one term.
A ggplot object representing the selected information criterion plot.
It's important to balance statistical measures with practical considerations
and to visually inspect the model fit using functions like
plotPercentiles.
bestModel, plotPercentiles, printSubset
Other plot:
compare(),
plot.cnorm(),
plot.cnormBetaBinomial(),
plot.cnormBetaBinomial2(),
plotDensity(),
plotDerivative(),
plotNorm(),
plotNormCurves(),
plotPercentileSeries(),
plotPercentiles(),
plotRaw()
## Not run:
# Compute model with example data and plot information function
cnorm.model <- cnorm(raw = elfe$raw, group = elfe$group)
plotSubset(cnorm.model)
# Plot BIC against adjusted R-squared
plotSubset(cnorm.model, type = 2)
# Plot RMSE against number of terms
plotSubset(cnorm.model, type = 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.