fit.sgs: Fit a model of trait evolution with a protracted punctuation.

Description Usage Arguments Value See Also Examples

View source: R/complexModels.R

Description

This function fits a model of punctuated change that is is protracted enough that it is captured by multiple transitional populations. Trait evolution starts in stasis, shifts to a general random walk, and then shifts back into stasis.

Usage

1
2
fit.sgs(y, minb = 7, oshare = TRUE, pool = TRUE, silent = FALSE,
  hess = FALSE, meth = "L-BFGS-B", model = "GRW")

Arguments

y

a paleoTS object

minb

minimum number of populations within each segment

oshare

logical, if TRUE, variance assumed to be shared (equal) across segments

pool

if TRUE, sample variances are substituted with their pooled estimate

silent

logical, if TRUE, progress updates are suppressed

hess

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

meth

optimization method, passes to optim

model

type of random walk: "URW", unbiased random walk, or "GRW", a general (directional) random walk

Value

a paleoTSfit object

See Also

fitGpunc

Examples

1
2
3
4
5
x <- sim.sgs(ns = c(15, 15, 15))  # default values OK
w <- fit.sgs(x, minb = 10)  # increase minb so example takes less time; not recommended!
plot(x)
abline(v = c(16, 31), lwd = 3)  # actual shifts
abline(v = c(w$parameters[6:7]), lwd = 2, lty = 3, col = "red")  # inferred shifts

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