Learn R Programming

StepReg (version 1.6.0)

report: Generate Stepwise Regression Report

Description

Creates formatted reports from StepReg objects in various document formats. This function generates comprehensive reports containing all tables and results from the stepwise regression analysis.

Usage

report(x, report_name, format = c("html", "docx", "rtf", "pptx"))

Value

Creates report file(s) in the specified format(s) in the current working directory. The file name will be report_name.format (e.g., "myreport.html", "myreport.docx").

Arguments

x

A StepReg object containing the results of stepwise regression analysis.

report_name

Character. The name of the output report file(s) without extension.

format

Character vector. The output format(s) for the report. Choose from:

  • "html" - Web page format (default)

  • "docx" - Microsoft Word document

  • "pptx" - Microsoft PowerPoint presentation

  • "rtf" - Rich Text Format

Multiple formats can be specified simultaneously.

Details

The generated report includes:

  • Summary of model parameters and selection criteria

  • Variable types and classifications

  • Step-by-step selection process

  • Final selected model and fit statistics

  • Model coefficients and significance levels

See Also

stepwise for creating StepReg objects

plot.StepReg for visualization of results

Examples

Run this code
if (FALSE) {
# Load leukemia remission data
data(remission)

# Run stepwise logistic regression
formula <- remiss ~ .
result <- stepwise(
  formula = formula,
  data = remission,
  type = "logit",
  strategy = c("forward", "bidirection"),
  metric = c("AIC", "BIC")
)

# Generate reports in multiple formats
report(
  x = result,
  report_name = "leukemia_analysis",
  format = c("html", "docx")
)
}

Run the code above in your browser using DataLab