plot_fit: Model fit comparisons

View source: R/plot_fit.R

plot_fitR Documentation

Model fit comparisons

Description

Model fit comparisons

Usage

plot_fit(
  model_result,
  model_result_y = NULL,
  x,
  y,
  x_label = NULL,
  y_label = NULL,
  metrics = "AIC"
)

Arguments

model_result

List of data frames output by kimma::kmFit(). Must contain both x and y models if model_result_y not provided.

model_result_y

List of data frame output by kimma::kmFit()

x

Character string of model to plot on x-axis. Must match object names in model_result. For example, "lm", "lme", "lmerel"

y

Character string of model to plot on y-axis. Must match object names in model_result. For example, "lm", "lme", "lmerel"

x_label

Character string to use for x-axis label. If NULL, the model type and variables are used

y_label

Character string to use for y-axis label. If NULL, the model type and variables are used

metrics

Character vector of metric to plot. For example, "sigma", "AIC", "BIC", "Rsq", "adj_Rsq". Default is "AIC"

Value

ggplot object

Examples

plot_fit(example.model, example.model, x="lme", y="lmerel", metrics=c("sigma","AIC","Rsq"))

BIGslu/BIGpicture documentation built on Oct. 14, 2024, 9:30 p.m.