View source: R/print.StepReg.R
| print.StepReg | R Documentation |
Displays the final model fit statistics from a StepReg object. This function provides a concise summary of the selected model's performance metrics.
## S3 method for class 'StepReg'
print(x, ...)
x |
A StepReg object containing the results of stepwise regression analysis. |
... |
Additional arguments passed to the print method (currently not used). |
The print method provides a focused view of the final model's performance,
showing the selected variables and their corresponding fit statistics. This is useful
for quickly assessing the model's quality without the detailed step-by-step selection
process (which can be viewed using stepwise).
Invisibly returns the printed object. The function displays:
Final model fit statistics for each strategy and metric combination
stepwise for creating StepReg objects
plot.StepReg for visualization of results
## Not run:
# Load example data
data(mtcars)
# Run stepwise regression
formula <- mpg ~ .
result <- stepwise(
formula = formula,
data = mtcars,
type = "linear",
strategy = "forward",
metric = "AIC"
)
# Print final model statistics
result
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.