| report | R Documentation |
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.
report(x, report_name, format = c("html", "docx", "rtf", "pptx"))
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:
Multiple formats can be specified simultaneously. |
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
Note: Exporting reports requires pandoc to be installed on your system. Pandoc is typically included with RStudio. If not available, install it from https://pandoc.org/installing.html or via your system package manager.
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").
stepwise for creating StepReg objects
plot.StepReg for visualization of results
## Not run:
# 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")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.