plot_obs_vs_pred: Plot observed vs predicted values with correlation

View source: R/model_evaluation.R

plot_obs_vs_predR Documentation

Plot observed vs predicted values with correlation

Description

Creates a scatterplot of observed vs predicted values, with a 1:1 reference line and Pearson's R².

Usage

plot_obs_vs_pred(observed, predicted, title = "")

Arguments

observed

Numeric vector of observed values.

predicted

Numeric vector of predicted values.

title

String for the plot title (default: "").

Value

No return value; called for side effect of displaying a plot.

Examples

observed <- c(10, 20, 30, 40)
predicted <- c(12, 18, 33, 39)
plot_obs_vs_pred(observed, predicted, title = "Observed vs Predicted")


mlspatial documentation built on Aug. 27, 2025, 1:09 a.m.