Learn R Programming

paleoTS (version 0.5-1)

fitMult: Functions to estimate models over multiple time-series

Description

These functions are used to estimate parameters of models over two or more sequences. Models that can be fit include the general (directional) random walk, unbiased random walk and stasis, and variants of the general random walk in which the step variance but not the mean step is shared over sequences (opt.RW.SameVs) or the mean step but not the step variance is shared (opt.RW.SameMs).

Usage

fitMult(yl, model=c("GRW", "URW", "Stasis", "covTrack"), method=c("Joint", "AD"), 
        pool=TRUE, zl=NULL, hess=FALSE)

opt.joint.Mult(yl, cl=list(fnscale=-1), model=c("GRW", "URW", "Stasis"), pool=TRUE, meth="L-BFGS-B", hess=FALSE) opt.Mult(yl, cl=list(fnscale=-1), model=c("GRW", "URW", "Stasis"), pool=TRUE, meth="L-BFGS-B", hess=FALSE) opt.RW.SameMs(yl, cl=list(fnscale=-1), pool=TRUE, meth="L-BFGS-B", hess=FALSE) opt.RW.SameVs(yl, cl=list(fnscale=-1), pool=TRUE, meth="L-BFGS-B", hess=FALSE) logL.joint.Mult(p, yl, model=c("GRW", "URW", "Stasis")) logL.Mult(p, yl, model = c("GRW", "URW", "Stasis")) logL.SameMs(p, yl) logL.SameVs(p, yl)

Arguments

yl

a list of paleoTS objects.

model

GRW for general random walk (directional evolution), URW for unbiased random walk, or Stasis

method

parameterization to use: Joint or AD; see Details

pool

logical, if TRUE variances are pooled across samples

zl

a list of covariate vectors, one for each paleoTS object in yl

cl

optimization option, passed to optim

meth

optimization option, passed to optim

hess

optimization option, passed to optim

p

a vector of parameter values

Value

Varies by function, see corresponding functions for the analysis of single sequences for more information.

Details

Users will generally only call fitMult, which can fit general random walks, unbiased random walks or stasis. Functions opt.RW.SameVs and opt.RW.SameMs fit a variant of the general random walk in which only the mean step (or the step variance) is shared across sequences; see Hunt (2006, p. 590) and note that only the AD method is available for these.

These functions work just as their conterparts for the analysis of single sequences; see those help functions for more detail.

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32:578--601. Hunt, et al. 2010. Climate-driven body-size trends in the ostracod fauna of the deep Indian Ocean, Palaeontology 53:1255--1268.

See Also

logL.GRW, opt.GRW, fitSimple, opt.covTrack

Examples

Run this code
# NOT RUN {
 ## create two sequences, with different parameter values
 y1<- sim.GRW(ns=20, ms=0, vs=1)
 y2<- sim.GRW(ns=20, ms=0, vs=0.2)

 ## fit some models with at least some shared dynamics across sequences
 m1<- fitMult(list(y1,y2), model="GRW", method="Joint")
 m2<- fitMult(list(y1,y2), model="URW", method="Joint")
 m3<- fitMult(list(y1,y2), model="Stasis", method="Joint")
 compareModels(m1, m2, m3)
 
# }

Run the code above in your browser using DataLab