opt.covTrack: Fit a model in which a trait tracks a covariate

Description Usage Arguments Details Value Functions Warning References See Also Examples

Description

Fit a model in which a trait tracks a covariate

Usage

1
2
3
4
5
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)

Arguments

y

a paloeTS object

z

a vector of covariate values

pool

if TRUE, sample variances are substituted with their pooled estimate

cl

optional control list, passed to optim()

meth

optimization algorithm, passed to optim()

hess

if TRUE, return standard errors of parameter estimates from the hessian matrix

Details

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.

Value

a paleoTSfit object with the results of the model fitting

Functions

Warning

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.

References

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.

See Also

fitSimple

Examples

1
2
3
4
5
6
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)

Example output

Warning message:
In sim.covTrack(ns = 12, z = z, b = 0.5, evar = 0.2) :
  Covariate z is same length of sequence (ns); using first difference of z as the covariate.
Warning message:
In opt.covTrack(x, z = z) :
  Covariate z is same length of sequence (ns); using first difference of z as the covariate.

Comparing 2 models [n = 11, method = AD]

                     logL K     AICc  dAICc Akaike.wt
URW            -25.062923 1 52.57029 27.457         0
TrackCovariate  -9.806646 2 25.11329  0.000         1

paleoTS documentation built on May 2, 2019, 1:07 p.m.