This function overlays a heatmap of residuals on a melatonin profile plot, visualizing the goodness of fit across the Region of Interest (ROI) search grid.
Details
The color gradient represents residual values, with lower residuals indicating better fit.
Residuals are log-transformed for visualization.
Examples
if (FALSE) { # \dontrun{
plot <- ggplot2::ggplot(profile_data, ggplot2::aes(x = datetime, y = melatonin)) +
ggplot2::geom_point()
plot <- plot_roi_heatmap(plot, data = profile_data, roi_grid = grid, residuals = res)
} # }