plot.svem_model function

Plot Method for SVEM Models

Plot Method for SVEM Models

Plots actual versus predicted values for an svem_model using ggplot2.

## S3 method for class 'svem_model' plot(x, plot_debiased = FALSE, ...)

Arguments

  • x: An object of class svem_model.
  • plot_debiased: Logical; if TRUE, includes debiased predictions if available (default is FALSE).
  • ...: Additional arguments passed to ggplot2 functions.

Returns

A ggplot object showing actual versus predicted values.

Details

This function creates an actual vs. predicted plot for the SVEM model. If plot_debiased is TRUE and debiased predictions are available, it includes them in the plot.

Plot Features:

  • Actual vs. Predicted Points: Plots the actual response values against the predicted values from the SVEM model.
  • Debiased Predictions: If available and plot_debiased is TRUE, debiased predictions are included.
  • Ideal Fit Line: A dashed line representing perfect prediction (slope = 1, intercept = 0) is included for reference.

Acknowledgments

Development of this package was assisted by GPT o1-preview, which helped in constructing the structure of some of the code and the roxygen documentation. The code for the significance test is taken from the supplementary material of Karl (2024) (it was handwritten by that author).

  • Maintainer: Andrew T. Karl
  • License: GPL-2 | GPL-3
  • Last published: 2024-12-21

Useful links