plotSubset {cNORM} | R Documentation |
Evaluate information criteria for regression model
Description
This function plots various information criteria and model fit statistics against the number of predictors or 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 initial consistency check are depicted with an empty circle.
Usage
plotSubset(model, type = 0)
Arguments
model |
The regression model from the bestModel function or a cnorm object. |
type |
Integer specifying the type of plot to generate:
|
Details
The function generates different plots to help in model selection:
- For types 1 and 2 (Mallow'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 predictors. - For type 6 (p-values), values below the significance level (typically 0.05) suggest significant improvement with added predictors.
Value
A ggplot object representing the selected information criterion plot.
Note
It's important to balance statistical measures with practical considerations and
to visually inspect the model fit using functions like plotPercentiles
.
See Also
bestModel
, plotPercentiles
, printSubset
Other plot:
plot.cnorm()
,
plot.cnormBetaBinomial()
,
plot.cnormBetaBinomial2()
,
plotDensity()
,
plotDerivative()
,
plotNorm()
,
plotNormCurves()
,
plotPercentileSeries()
,
plotPercentiles()
,
plotRaw()
Examples
# 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 predictors
plotSubset(cnorm.model, type = 3)