compare_fits {LATERmodel}R Documentation

Compares the goodness-of-fit of a set of fit outcomes.

Description

Compares the goodness-of-fit of a set of fit outcomes.

Usage

compare_fits(fits)

Arguments

fits

A list where each item has a name that identifies the fit and a value given by the output of LATERmodel::fit_data.

Details

The 'evidence ratio' is calculated as per Motulsky & Christopolous (2004), p. 146.

Value

A list of fit comparison results, ordered such that the fit with the lowest AIC value is in the first row.

Examples


data <- rbind(
  data.frame(name = "test", time = 1000/rnorm(100, 3, 1)),
  data.frame(name = "test_2", time = 1000/rnorm(100, 1, 1))
) |> dplyr::filter(time > 0)
data <- prepare_data(data)
fit_a <- fit_data(data = data, share_a = TRUE)
fit_b <- fit_data(data = data, share_sigma = TRUE)
comparison <- compare_fits(fits = list(a = fit_a, b = fit_b))


[Package LATERmodel version 0.2.0 Index]