fitGpunc | R Documentation |
Fit trait evolution model with punctuations estimated from the data
fitGpunc(
y,
ng = 2,
minb = 7,
pool = TRUE,
oshare = TRUE,
method = c("Joint", "AD"),
silent = FALSE,
hess = FALSE,
parallel = FALSE,
...
)
y |
a |
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: |
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 |
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.
a paleoTSfit
object with the results of the model-fitting.
Calculations can be speeded up by setting parallel = TRUE
, which uses
package doParallel
to run the bootstrap replicates in parallel, using
one fewer than the number of detected cores.
fit9models
, sim.punc
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.