plot.comp_model: Plot Comparison of Model Specifications
Description
Generates a comprehensive 2x2 diagnostic dashboard comparing models with and
without an intercept. This visualization helps identify how the absence of
an intercept affects different R-squared definitions and error metrics.
Usage
# S3 method for comp_model
plot(x, ...)
Value
This function is primarily called for its side effect of creating a
grid-based plot. It returns the input object x invisibly.
Arguments
x
An object of class comp_model generated by comp_model().
...
Further graphical parameters (currently ignored).
Details
The plot is organized into four panels:
Top-Left: Grouped bar chart of the nine R-squared definitions.
Bottom-Left: Comparison of absolute fit metrics (RMSE, MAE, MSE).
Top-Right: Observed vs. Predicted plot for the intercept model.
Bottom-Right: Observed vs. Predicted plot for the no-intercept model.
This layout allows for a direct "cause-and-effect" analysis: for instance,
observing a data point far from the identity line in the bottom-right panel
explains why certain R-squared definitions might crash or become negative
in the left panels.