fit3models {paleoTS}R Documentation

Do model fits for three standard evolutionary models

Description

Functions fits three models to an evolutionary time series: (1) general random walk (=directional evolution), (2) unbiased random walk, and (3) stasis.

Usage

fit3models(y, pool = TRUE, silent = FALSE, wts = "AICc")
fit3models.joint(y, pool = TRUE, silent = FALSE, wts = "AICc")

Arguments

y a paleoTS object
pool logical, if TRUE, variances are pooled across samples
silent logical, if TRUE, results are not printed
wts what version of AIC to use for calculation of Akaike weights; either AIC or AICc

Details

The two versions refer to different parameterizations of the model. The plain version, fit3models, works from evolutionary differences between adjacent samples, and calls the functions opt.GRW, opt.URW and opt.Stasis. The joint version, fit3models.joint, considers all samples jointly rather than working with the differences between samples, and calls the functions opt.joint.GRW, opt.joint.URW and opt.joint.Stasis.
See the documentation under opt.joint.GRW for more information about the differences between these parameterizations.

Value

If silent=FALSE, function fit3models returns a vector of parameter estimates; if silent=TRUE, a list with the following components is returned, with models listed in the order of general random walk, unbiased random walk, and stasis:
aic Akaike information criterion
aicc AIC modified for low sample sizes
logl log-likelihoods of the three models
hats parameter estimates for general random walk (mstep, vstep), unbiased random walk (vstep) and stasis (theta, omega) models
ak.wts vector of Akaike weights

Author(s)

Gene Hunt

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology32:578–601.
Hunt, G., M. Bell & M. Travis. 2008. Evolution towards a new adaptive optimum: phenotypic evolution in a fossil stickleback lineage. Evolution 62:700–710.

See Also

opt.GRW, opt.joint.GRW

Examples

 ## show difference in parameterizations
 ### example 1, sequence with a strong trend ###
 # two parameterizations usually yield similar Akaike weights under these conditions
 x1<- sim.GRW(ns=10, ms=1, vs=0.5)
 plot(x1, nse=2)
 res1<- fit3models(x1, silent=TRUE)
 res1a<- fit3models.joint(x1, silent=TRUE)
 res1.tab<- rbind(res1$ak.wts, res1a$ak.wts)
 row.names(res1.tab)<- c("fit3models", "fit3models.joint")
 cat ("\n-- Akaike Weights from different parameterizations --\n")
 print (res1.tab)

 ## example 2, longer & noisy random walk
 ## joint parameterization often is better at correctly favoring URW under these conditions
 x2<- sim.GRW(ns=20, ms=0, vs=0.1)  # step variance relatively low compared to sampling error == Noisy
 plot(x2, nse=2)
 res2<- fit3models(x2, silent=TRUE)
 res2a<- fit3models.joint(x2, silent=TRUE)
 res2.tab<- rbind(res2$ak.wts, res2a$ak.wts)
 row.names(res2.tab)<- c("fit3models", "fit3models.joint")
 cat ("\n-- Akaike Weights from different parameterizations --\n")
 print (res2.tab)



[Package paleoTS version 0.3-1 Index]