fitSimple: Fit simple models of trait evolution

View source: R/simpleModels.R

fitSimpleR Documentation

Fit simple models of trait evolution

Description

Fit simple models of trait evolution

Usage

fitSimple(
  y,
  model = c("GRW", "URW", "Stasis", "StrictStasis", "OU", "covTrack"),
  method = c("Joint", "AD"),
  pool = TRUE,
  z = NULL,
  hess = FALSE
)

Arguments

y

a paleoTS object

model

the model to be fit, one of "GRW", "URW", "Stasis", "OU", "covTrack"

method

parameterization to use: Joint or AD; see Details

pool

if TRUE, sample variances are substituted with their pooled estimate

z

a vector of a covariate, used only for the "covTrack" model

hess

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

Details

This is a convenience function that calls the specific individual functions for each model and parameterization, such as opt.GRW and opt.joint.GRW. The models that this function can fit are:

  • GRW: General Random Walk. Under this model, evolutionary changes, or "steps" are drawn from a distribution with a mean of mstep and variance of vstep. mstep determines directionality and vstep determines volatility (Hunt, 2006).

  • URW: Unbiased Random Walk. Same as GRW with mstep = 0, and thus evolution is non-directional. For a URW, vstep is the rate parameter.

  • Stasis: This parameterization follows Sheets & Mitchell (2001), with a constant mean theta and variance omega (equivalent to white noise).

  • Strict Stasis: Same as Stasis with omega = 0, indicating no real evolutionary differences; all observed variation is sampling error (Hunt et al. 2015).

  • OU: Ornstein-Uhlenbeck model (Hunt et al. 2008). This model is that of a population ascending a nearby peak in the adaptive landscape. The optimal trait value is theta, alpha indicates the strength of attraction to that peak (= strength of stabilizing selection around theta), vstep measures the random walk component (from genetic drift) and anc is the trait value at the start of the sequence.

  • covTrack: Covariate-tracking (Hunt et al. 2010). The trait tracks a covariate with slope b1, consistent with an adaptive response. evar is the residual variance, and, under method = "Joint", b0 is the intercept of the relationship between trait and covariate. model.

Value

a paleoTSfit object with the model fitting results

Note

For the covariate-tracking model, z should be a vector of length n when method = "Joint" and n - 1 when method = "AD", where n is the number of samples in y.

Method = "Joint" is a full likelihood approach, considering each time-series as a joint sample from a multivariate normal distribution. Method = "AD" is a REML approach that uses the differences between successive samples. They perform similarly, but the Joint approach does better under some circumstances (Hunt, 2008).

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32(4): 578-601.
Hunt, G. 2008. Evolutionary patterns within fossil lineages: model-based assessment of modes, rates, punctuations and process. p. 117-131 In From Evolution to Geobiology: Research Questions Driving Paleontology at the Start of a New Century. Bambach, R. and P. Kelley (Eds).
Hunt, G., M. A. Bell and M. P. Travis. 2008. Evolution toward a new adaptive optimum: phenotypic evolution in a fossil stickleback lineage. Evolution 62(3): 700-710.
Sheets, H. D., and C. Mitchell. 2010. Why the null matters: statistical tests, random walks and evolution. Genetica 112– 113:105–125.

See Also

opt.GRW, opt.joint.GRW, opt.joint.OU, opt.covTrack

Examples

y <- sim.Stasis(ns = 20, omega = 2)
w1 <- fitSimple(y, model = "GRW")
w2 <- fitSimple(y, model = "URW")
w3 <- fitSimple(y, model = "Stasis")
compareModels(w1, w2, w3)

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