View source: R/complexModels.R
fit.sgs | R Documentation |
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.
fit.sgs( y, minb = 7, oshare = TRUE, pool = TRUE, silent = FALSE, hess = FALSE, meth = "L-BFGS-B", model = "GRW" )
y |
a |
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 |
model |
type of random walk: |
a paleoTSfit
object
fitGpunc
## Not run: 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 ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.