Learn R Programming

paleoTS (version 0.6.2)

fitGpunc: 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,
  ...
)

Value

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

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.

See Also

fit9models, sim.punc

Examples

Run this code
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)

Run the code above in your browser using DataLab