Learn R Programming

kvr2 (version 0.2.0)

plot.r2_kvr2: Plot Method for r2_kvr2 Objects

Description

Visualizes the nine definitions of R-squared to compare their values and identify potential issues (e.g., values exceeding 1 or falling below 0).

Usage

# S3 method for r2_kvr2
plot(x, ...)

Value

A ggplot object representing the visual analysis.

Arguments

x

An object of class r2_kvr2.

...

Currently ignored.

Examples

Run this code
df1 <- data.frame(x = 1:6, y = c(15, 37, 52, 59, 83, 92))
model <- lm(y ~ x - 1, data = df1) # No-intercept model
r2(model)

Run the code above in your browser using DataLab