| plot_pred_obs | R Documentation |
Creates a scatter plot of predicted vs. observed theta with a 1:1 line and optional regression line, optionally faceted by a grouping variable.
plot_pred_obs(
df,
obs_col = "theta_n",
pred_col = "theta_predicted",
group_col = NULL,
show_lm = TRUE,
show_stats = TRUE,
ncol = 5L,
base_size = 12,
point_alpha = 0.25,
title = NULL
)
df |
Data frame containing observed and predicted columns. |
obs_col |
Column name for observed theta (default |
pred_col |
Column name for predicted theta (default
|
group_col |
Column name for facet grouping (default |
show_lm |
Logical; add a linear regression line (default |
show_stats |
Logical; add R², RMSE, MAE text annotations (default
|
ncol |
Number of facet columns when |
base_size |
Base font size (default |
point_alpha |
Point transparency (default |
title |
Plot title (default |
A ggplot object.
df_plot <- data.frame(
theta_n = c(0.30, 0.25, 0.20, 0.15, 0.10),
theta_predicted = c(0.28, 0.26, 0.22, 0.14, 0.11)
)
plot_pred_obs(df_plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.