Learn R Programming

paleoTS (version 0.5-1)

fit3models: Do model fits for standard sets of evolutionary models

Description

fit3models fits to an evolutionary time series: (1) general random walk (=directional evolution), (2) unbiased random walk, and (3) stasis. fit4models adds the model of Strict Stasis, and fit9models adds models with complex evolutionary dynamics from Hunt et al. (2015).

Usage

fit3models(y, silent = FALSE, method=c("Joint", "AD"), ...)
fit4models(y, silent = FALSE, method=c("Joint", "AD"), ...)
fit9models(y, silent = FALSE, method=c("Joint", "AD"), ...)

Arguments

y

a paleoTS object

silent

logical, if TRUE, results are not printed

method

parameterization to use: see Details

further arguments, passed to optimization functions

Value

If silent=FALSE, function fit3models prints and returns a dataframe with log-likelihoods, numbers of parameters, AICc scores and Akaike weights for the three models. If silent=TRUE, a list is returned with element 'modelFits' that has the same dataframe, plus an element 'parameters' with the sub-elements for all the parameter estimates.

Details

The method argument refers to different parameterizations of the model. See the documentation under opt.joint.GRW for more information about the differences between these parameterizations.

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32:578--601. Hunt, G. 2008. Evolutionary patterns within fossil lineages: model-based assessment of modes, rates, punctuations and process.. In R.K. Bambach and P.H. Kelley, eds. From Evolution to Geobiology: Research Questions Driving Paleontology at the Start of a New Century: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, fitModeShift

Examples

Run this code
# NOT RUN {
 ## 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)
 res1AD<- fit3models(x1, method='AD')
 res1Joint<- fit3models(x1, method='Joint')

 ## example 2, longer & noisy directional walk
 ## joint parameterization often is better at correctly favoring GRW under these conditions
 ## step variance relatively low compared to sampling error == Noisy
 x2<- sim.GRW(ns=20, ms=0.2, vs=0.1, vp=10)  
 res2AD<- fit3models(x2, method='AD')
 res2Joint<- fit3models(x2, method='Joint')


# }

Run the code above in your browser using DataLab