compareModels: Compare model fits for a paleontological time-series

View source: R/basics.R

compareModelsR Documentation

Compare model fits for a paleontological time-series

Description

Takes output from model-fitting functions and compiles model-fit information (log-likelihood, AICc, etc.) into a convenient table

Usage

compareModels(..., silent = FALSE, sort = FALSE)

Arguments

...

any number of model fit (as.paleoTSfit) objects

silent

if TRUE, suppresses printing

sort

if TRUE, the table sorts models from best to worst

Value

if silent = FALSE, the table is printed and nothing is returned. If silent = TRUE, printing is suppressed and a list of two objects is returned: the table of model fits, modelFits, and a list of parameter estimates, pl.

Examples

x <- sim.GRW(ns = 40, ms = 0.5, vs = 0.1)
m1 <- fitSimple(x, model = "GRW")  # the true model
m2 <- fitSimple(x, model = "URW")
plot(x, modelFit = m1)
compareModels(m1, m2)

paleoTS documentation built on Sept. 11, 2024, 9:18 p.m.