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
).
1 2 3 4 5 6 7 8 9 10 11 12 13  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="LBFGSB", hess=FALSE)
opt.Mult(yl, cl=list(fnscale=1), model=c("GRW", "URW", "Stasis"), pool=TRUE,
meth="LBFGSB", hess=FALSE)
opt.RW.SameMs(yl, cl=list(fnscale=1), pool=TRUE, meth="LBFGSB", hess=FALSE)
opt.RW.SameVs(yl, cl=list(fnscale=1), pool=TRUE, meth="LBFGSB", 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)

yl 
a list of 
model 

method 
parameterization to use: 
pool 
logical, if TRUE variances are pooled across samples 
zl 
a list of covariate vectors, one for each 
cl 
optimization option, passed to 
meth 
optimization option, passed to 
hess 
optimization option, passed to 
p 
a vector of parameter values 
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.
Varies by function, see corresponding functions for the analysis of single sequences for more information.
Gene Hunt
Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32:578–601.
Hunt, et al. 2010. Climatedriven bodysize trends in the ostracod fauna of the deep Indian Ocean, Palaeontology 53:1255–1268.
logL.GRW
, opt.GRW
, fitSimple
, opt.covTrack
1 2 3 4 5 6 7 8 9 10  ## 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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.