fitMult: Fit the same simple model across multiple time-series

View source: R/multModels.R

fitMultR Documentation

Fit the same simple model across multiple time-series

Description

Fit the same simple model across multiple time-series

Usage

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

Arguments

yl

a list of paleoTS objects

model

the model to fit; see Details

method

parameterization to use: Joint or AD

pool

if TRUE, sample variances are substituted with their pooled estimate

zl

for the covTrack model only, a list of covariate vectors, one each paleoTS object in yl

hess

if TRUE, standard errors computed from the Hessian matrix are returned

Details

This function fits a model with shared parameters across multiple trait time-series. The most likely application would be to model a common evolutionary dynamic across different sequences, perhaps representing time-series of the same trait and lineage from different localities or time intervals.

Four simple models are currently implemented:

  • GRW: parameters mstep and vstep of the general random walk are shared across sequences.

  • URW: parameter vstep of the unbiased random walk is shared across sequences.

  • Stasis: parameter omega of stasis is shared across sequences.

  • covTrack: parameters b0, b1, and evar of the covariate-tracking model are shared across sequences.

Under the joint parameterization, method = "Joint", an additional parameter, anc is fit, representing the ancestral (starting) trait value. This parameter is estimated separately in each sequence so it is not assumed that they all start at the same trait value.

Value

a paleoTSfit object with the results of the model-fitting

Note

The models are described in the help for fitSimple and the functions linked from there.

See Also

fitSimple

Examples

x1 <- sim.GRW(ms = 1, vs = 0.2)
x2 <- sim.GRW(ms = 1, vs = 0.2)
fitMult(list(x1, x2), model = "GRW")

paleoTS documentation built on Aug. 9, 2022, 1:06 a.m.