Learn R Programming

StepReg (version 1.6.0)

print.StepReg: Print Stepwise Regression Results

Description

Displays the final model fit statistics from a StepReg object. This function provides a concise summary of the selected model's performance metrics.

Usage

# S3 method for StepReg
print(x, ...)

Value

Invisibly returns the printed object. The function displays:

  • Final model fit statistics for each strategy and metric combination

Arguments

x

A StepReg object containing the results of stepwise regression analysis.

...

Additional arguments passed to the print method (currently not used).

Details

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).

See Also

stepwise for creating StepReg objects

plot.StepReg for visualization of results

Examples

Run this code
if (FALSE) {
# 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
}

Run the code above in your browser using DataLab