fitGpunc: Fit trait evolution model with punctuations estimated from...

fitGpuncR Documentation

Fit trait evolution model with punctuations estimated from the data

Description

Fit trait evolution model with punctuations estimated from the data

Usage

fitGpunc(
  y,
  ng = 2,
  minb = 7,
  pool = TRUE,
  oshare = TRUE,
  method = c("Joint", "AD"),
  silent = FALSE,
  hess = FALSE,
  parallel = FALSE,
  ...
)

Arguments

y

a paleoTS object

ng

number of groups (segments) in the sequence

minb

minimum number of populations within each segment

pool

if TRUE, sample variances are substituted with their pooled estimate

oshare

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

method

parameterization to use: Joint or AD; see Details

silent

logical, if TRUE, progress updates are suppressed

hess

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

parallel

logical, if TRUE, the analysis is done in parallel

...

other arguments, passed to optimization functions

Details

This function tests all possible shift points for punctuations, subject to the constraint that the number of populations in each segment is always >= minb. The shiftpoint yielding the highest log-likelihood is returned as the solution, along with the log-likelihoods (all.logl) of all tested shift points (GG).

The function uses opt.punc (if method = "AD") or opt.joint.punc (if method = "Joint") to do the fitting.

Value

a paleoTSfit object with the results of the model-fitting.

Note

Calculations can be sped up by setting parallel = TRUE, which uses functions from the doParallel package to run the bootstrap replicates in parallel, using one fewer than the number of detected cores.

See Also

fit9models, sim.punc

Examples

x <- sim.punc(ns = c(15, 15), theta = c(0,3), omega = c(0.1, 0.1))
w.punc <- fitGpunc(x, oshare = TRUE)
plot(x, modelFit = w.punc)

paleoTS documentation built on Aug. 9, 2022, 1:06 a.m.