Skip to contents

Plots observed values vs. predicted values. The predicted values are obtained from the model with the parameters values estimated by maximum likelihood estimation using simulated annealing.

Usage

mle_plot_observed(
  x,
  yvar,
  annotate = TRUE,
  lab_x = "Observed",
  lab_y = "Predicted",
  ...
)

Arguments

x

List with the results of the simulated annealing algorithm for Maximum Likelihood Estimation. See likelihood::anneal()

yvar

The name of the column that contains the dependent variable (the “observed” value). This column must be present in the source_data of the x (results) list

annotate

logical (default to TRUE), display the values of \(R^2\) and slope of the regression of the observed on predicted values. See likelihood::Simulated Annealing Algorithm

lab_x

The text for the x-axis lab

lab_y

The text for the y-axis lab

...

other ggplot2 parameters

Value

A ggplot object displaying the observed vs. predicted values, with optional annotations for \(R^2\) and regression slope.