Learn R Programming

paleoTS (version 0.6.2)

compareModels: 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)

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.

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

Examples

Run this code
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)

Run the code above in your browser using DataLab