Learn R Programming

paleoTS

The goal of paleoTS is to allow the user to simulate and fit time-series models commonly used to understand trait evolution in paleontology. Models include random walks, stasis, directional trends, OU, covariate-tracking, punctuations and more. Model fitting is done via maximum likelihood.

Example

This is a simple example in which a time-series is generated, plotted, and then fit with three common models in paleobiology. The generating model is a general (also called biased) random walk, with a pretty strong trend parameter. Usually, this model receives just about all of the available model support with these generating parameters.

library(paleoTS)
y <- sim.GRW(ns = 40, ms = 0.3)
plot(y)
fit3models(y)
#> 
#> Comparing 3 models [n = 40, method = Joint]
#> 
#>              logL K      AICc     dAICc Akaike.wt
#> GRW     -26.86719 3  60.40106   0.00000         1
#> URW     -37.85943 2  80.04318  19.64213         0
#> Stasis -113.33758 2 230.99949 170.59844         0

Take a look at the vignette “paleoTS_basics” for more of an introduction to this package.

Installation

paleoTS should be installed from CRAN.

Copy Link

Version

Install

install.packages('paleoTS')

Monthly Downloads

432

Version

0.6.2

License

GPL-3

Maintainer

Gene Hunt

Last Published

September 10th, 2024

Functions in paleoTS (0.6.2)

fitModeShift

Fit model in which the mode of trait evolution shifts once
fit.sgs

Fit a model of trait evolution with a protracted punctuation.
fit9models

Fit large set of models to a time-series
dorsal.spines

Time-series of dorsal spine data from a fossil stickleback lineage
fitSimple

Fit simple models of trait evolution
fitMult

Fit the same simple model across multiple time-series
fitGpunc

Fit trait evolution model with punctuations estimated from the data
compareModels

Compare model fits for a paleontological time-series
fit3models

Fit a set of standard evolutionary models
ln.paleoTS

Approximate log-transformation of time-series data
opt.ssm.GRW

Fit evolutionary models using state-space models (SSM)
opt.covTrack

Fit a model in which a trait tracks a covariate
paleoTS-package

paleoTS: Analyze Paleontological Time-Series
std.paleoTS

Convert time-series to standard deviation units
pool.var

Compute a pooled variance
plot.paleoTS

Plot a paleoTS object
sub.paleoTS

Subsample a paleontological time-series
opt.GRW

Fit evolutionary model using "AD" parameterization
opt.joint.GRW

Fit evolutionary models using the "Joint" parameterization
opt.GRW.shift

Fit random walk model with shift(s) in generating parameters
sim.Stasis

Simulate Stasis time-series for trait evolution
sim.punc

Simulate a punctuated time-series
sim.sgs

Simulate protracted punctuation
sim.covTrack

Simulate trait evolution that tracks a covariate
mle.GRW

Analytical ML estimator for random walk and stasis models
read.paleoTS

Read a text-file with data from a paleontological time-series
print.paleoTSfit

Print a paleoTSfit object
opt.punc

Fit a model of trait evolution with specified punctuation(s)
sim.GRW.shift

Simulate (general) random walk with shift(s) in generating parameters
sim.Stasis.RW

Simulate trait evolution with a mode shift
lynchD

Compute Lynch's Delta rate metric
sim.OU

Simulate an Ornstein-Uhlenbeck time-series
opt.joint.OU

Fit Ornstein-Uhlenbeck model using the "Joint" parameterization
sim.GRW

Simulate random walk or directional time-series for trait evolution
test.var.het

Test for heterogeneity of variances among samples in a time-series
IC

Compute Information Criteria
ESD

Compute Expected Squared Divergence (ESD) for Evolutionary Models
checkSSMresiduals

Compute and (optionally) plot residuals from SSM model fit
Kfiltertv

Time-varying Kalman filter calculations
cantius_L

Time-series of the length of lower first molar for the Cantius lineage
as.paleoTSfit

Create a paleoTSfit object
LRI

Log-rate, Log-interval (LRI) method of Gingerich
bootSimpleComplex

Bootstrap test to see if a complex model is significantly better than a simple model.
akaike.wts

Compute Akaike weights from AIC scores
as.paleoTS

Make a Paleontological Time-series object