Learn R Programming

paleoTS (version 0.5-1)

fitSimple: Fit simple models of trait evolution

Description

A convenience wrapper function that can calls other paleoTS functions to fit the unbiased random walk (URW), general random walk (GRW), Stasis, Strict Stasis, Ornstein-Uhlenbeck (OU) and covariate-tracking (covTrack) models.

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 c("GRW", "URW", "Stasis", "OU", "covTrack")

method

parameterization to use: Joint or AD; see Details

pool

logical indicating whether to pool variances across samples

z

the covariate variable; only used for the covTrack model

hess

logical, indicating whether to calculate standard errors from the Hessian matrix

Value

A paleoTSfit object.

Details

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.

Note that the AD method has not been implemented for the OU model. The Joint method seems to do rather better for this model, anyway.

fitMult fits these models (excpet for the OU model) over multiple paleoTS objects, under the assumption that the same model applies to all the trait sequences. Parameters other than the stasis mean (theta) and the ancestral state (anc) are also assumed to be shared among sequences.

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32:578--601. Hunt, G., M. J. Hopkins, and S. L. Lidgard 2015. Simple versus complex models of trait evolution and stasis as a response to environmental change. PNAS 112:4885--4890.

See Also

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

Examples

Run this code
# NOT RUN {
	x<- sim.Stasis(ns=30, theta=10, omega=1)
	s1<- fitSimple(x, model="URW")
	s2<- fitSimple(x, model="Stasis")
	s3<- fitSimple(x, model="StrictStasis")
	compareModels(s1, s2, s3)
# }

Run the code above in your browser using DataLab