fitModeShift {paleoTS} | R Documentation |
Fit model in which the mode of trait evolution shifts once
Description
Trait evolution is modeled as a shift from a random walk (general or unbiased) to stasis, or vice versa.
Usage
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 |
|
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 |
rw.model |
whether the random walk segment is an unbiased random walk, |
method |
parameterization to use: |
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
Examples
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
[Package paleoTS version 0.6.1 Index]