fitModeShift: Fit model in which the mode of trait evolution shifts once

Description Usage Arguments Value See Also Examples

View source: R/complexModels.R

Description

Trait evolution is modeled as a shift from a random walk (general or unbiased) to stasis, or vice versa.

Usage

1
2
3
fitModeShift(y, minb = 7, pool = TRUE, order = c("Stasis-RW",
  "RW-Stasis"), rw.model = c("URW", "GRW"), method = c("Joint", "AD"),
  silent = FALSE, hess = FALSE, ...)

Arguments

y

paleoTS object

minb

minimum number of populations within each segment

pool

if TRUE, sample variances are substituted with their pooled estimate

order

whether stasis or random walk come first, one of Stasis-RW or RW-Stasis

rw.model

whether the random walk segment is an unbiased random walk, URW or a general random walk, GRW

method

parameterization to use: Joint or AD

silent

logical, if TRUE, progress updates are suppressed

hess

if TRUE, standard errors computed from the Hessian matrix are returned

...

other arguments, passed to optimization functions

Value

a paleoTSfit object

See Also

sim.Stasis.RW

Examples

1
2
3
4
5
x <- sim.Stasis.RW(ns = c(15, 15), omega = 0.5, ms = 1, order = "Stasis-RW")
plot(x)
w <- fitModeShift(x, order = "Stasis-RW", rw.model = "GRW")
abline(v = x$tt[15], lwd = 3)  # actual shift point
abline(v = x$tt[w$par["shift1"]], lty = 3, lwd = 2, col = "red") # inferred shift

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