Learn R Programming

paleoTS (version 0.6.2)

opt.punc: Fit a model of trait evolution with specified punctuation(s)

Description

Fit a model of trait evolution with specified punctuation(s)

Usage

opt.punc(
  y,
  gg,
  pool = TRUE,
  cl = list(fnscale = -1),
  meth = "L-BFGS-B",
  hess = FALSE,
  oshare
)

opt.joint.punc( y, gg, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE, oshare )

Value

a paleoTSfit object with the results of the model fitting

Arguments

y

a paleoTS object

gg

vector of indices indicating different segments

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

oshare

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

Functions

  • opt.joint.punc(): fits the punctuation model using the joint parameterization

Details

The sequence is divided into segments, which are separated by punctuations. Means for each segment are given by the vector theta with variances given by the vector omega (or a single value if oshare = TRUE). This function calls optim to numerically fit this model to a time-series, y.

See Also

fitGpunc

Examples

Run this code
x <- sim.punc(ns = c(15, 15), theta = c(0,3), omega = c(0.1, 0.1))
w.sta  <- fitSimple(x, model = "Stasis", method = "Joint")
w.punc <- opt.joint.punc(x, gg = rep(1:2, each = 15), oshare = TRUE)
compareModels(w.sta, w.punc)

Run the code above in your browser using DataLab