opt.covTrack | R Documentation |
Fit a model in which a trait tracks a covariate
opt.covTrack( y, z, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE ) opt.joint.covTrack( y, z, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE )
y |
a |
z |
a vector of covariate values |
pool |
if TRUE, sample variances are substituted with their pooled estimate |
cl |
optional control list, passed to |
meth |
optimization algorithm, passed to |
hess |
if TRUE, return standard errors of parameter estimates from the hessian matrix |
In this model, changes in a trait are linearly related to changes in
a covariate with a slope of b
and residual variance evar
:
dx = b * dz + eps
, where eps ~ N(0, evar)
. This model was
described, and applied to an example in which body size changes tracked
changes in temperature, by Hunt et al. (2010).
For the AD version (opt.covTrack
), a trait sequence of
length ns
, the covariate, z
, can be of length ns
- 1,
interpreted as the vector of changes, dx
. If z
is
of length ns
, differences are taken and these are used as the
dx
's, with a warning issued.
The Joint version
(opt.joint.covTrack
), z
should be of length ns
and
there is an additional parameter that is the intercept of the linear
relationship between trait and covariate. See warning below about using the
Joint version.
a paleoTSfit
object with the results of the model fitting
opt.joint.covTrack()
: fits the covTrack model using the joint parameterization
The Joint parameterization of this model can be fooled by temporal autocorrelation and, especially, trends in the trait and the covariate. The latter is tested for, but the AD parameterization is generally safer for this model.
Hunt, G, S. Wicaksono, J. E. Brown, and K. G. Macleod. 2010. Climate-driven body size trends in the ostracod fauna of the deep Indian Ocean. Palaeontology 53(6): 1255-1268.
fitSimple
set.seed(13) z <- c(1, 2, 2, 4, 0, 8, 2, 3, 1, 9, 4, 3) x <- sim.covTrack(ns = 12, z = z, b = 0.5, evar = 0.2) w.urw <- opt.URW(x) w.cov <- opt.covTrack(x, z = z) compareModels(w.urw, w.cov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.