Linear Regression Model Statistics Line

Description

Returns a formatted text string with overall model statistics (R, R-squared, F, df, p) as either a filled answer key or blank worksheet.

Usage

linear_reg_model_statistics(reg_results_list, KEY = TRUE, highlight = TRUE)

regression_model_statistics(...)

Arguments

reg_results_list Output from linear_reg_answers().
KEY Logical. If TRUE (default), show filled values. If FALSE, show blanks.
highlight Logical. If TRUE (default) and KEY = TRUE, wrap values in highlight markup for Quarto/RMarkdown.
Additional arguments passed to underlying functions

Value

A character string.

Examples

library("psych350lab")

data(superman, package = "psych350data")
sm <- superman |>
  dplyr::filter(!is.na(rt_critics_score), !is.na(rt_audience_score))
result <- linear_reg_answers(
  data = sm,
  criterion = "rt_critics_score",
  quant_predictors = c("clark_height_in", "rt_audience_score"),
  quant_labels = c("Height", "Audience"),
  criterion_label = "Critics Score"
)
cat(linear_reg_model_statistics(result, KEY = TRUE, highlight = FALSE))
R = .61     R² = .37     F = 1.49     df = 2, 5     p = .311