powered by
Function to simulate a time-series of trait values in which each evolutionary increment is linearly related to changes in a covariate
sim.covTrack(ns = 20, b = 1, evar = 0.1, z, nn = rep(20, times = ns), tt = 0:(ns-1), vp = 1)
number of samples in time-series
slope of the relationship between evolutionary changes and changes in the covaiate
residual variance around covariate-trait relationship
a measured covariate
vector of the number of individuals in each sample
vector of sample ages, increases from oldest to youngest
within-population trait variance
An object of class paleoTSfit
paleoTSfit
See opt.covTrack for a description of the model.
opt.covTrack
Hunt, et al. 2010. Climate-driven body-size trends in the ostracod fauna of the deep Indian Ocean, Palaeontology 53:1255--1268.
opt.covTrack, as.paleoTSfit
as.paleoTSfit
# NOT RUN { z<- rnorm(20) x<- sim.covTrack(ns=20, b=2, evar=0.3, z) plot(diff(z), diff(x$mm), xlab="Change in covariate", ylab="Change in Trait") abline(h=0, lty=3) abline(v=0, lty=3) # }
Run the code above in your browser using DataLab