opt.GRW.shift {paleoTS}R Documentation

Functions for random walks with shifting parameters

Description

Functions to simulate and to infer a model with random walk dynamics, with parameter values that shift at one or more points in the sequence.

Usage

opt.GRW.shift(y, ng = 2, minb = 5, model = 1, pool = TRUE, silent = FALSE)

Arguments

y a paleoTS object
ng the number of different segments in the sequence
minb the minimum number of samples to consider as a segment
model options for variants of random walk to fit (see Details).
pool if TRUE, pool phenotypic variances across samples
silent if TRUE, do not print information on fitting to screen

Details

This model divides an evolutionary sequence into two or more non-overlapping parts called segments, and then fits some version of the random walk model to each segment separately.
The model argument has four options:
model=1, general random walk model, step variance shared across segments
model=2, general random walk model, step mean shared across segments
model=3, unbiased random walk, separate step variance for each segment model=4, general random walk, speparate step mean and variance for each segment

Value

A list including:
value the log-likelihood of the optimal solution
par parameter estimates
K number of parameters in the model
n the number of observations, equal to the number of evoltuionary transistions
shift.start the index of the initial samples of each segment
AIC Akaike information criterion
AICc modified Akaike information criterion
BIC Bayes (or Schwarz) information criterion
shift.start index of each sample that starts a new segment
all.logl log-likelihoods for all tested partitions of the series into segments
GG matrix of indices of initial samples of each tested segment configuration; each column of GG corresponds to the elements of all.logl

Author(s)

Gene Hunt

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology32:578–601.
Hunt, G. 2008. Gradual or pulsed evolution: when should punctuational explanations be preferred? Paleobiology34:In press.

See Also

sim.GRW.shift, opt.GRW, opt.RW.Mult

Examples

 x<- sim.GRW.shift(ns=c(20,20), ms=c(0,1), vs=c(0.2, 0.2))
 plot(x)
 w.shift<- opt.GRW.shift(x, ng=2, model=1)
 print (w.shift$par)
 print (w.shift$shift.start)  # estimated first sample in second segment

[Package paleoTS version 0.3-1 Index]