cat.paleoTS {paleoTS} | R Documentation |
These functions are used internally in the simulation and fitting of models with heterogeneous evolutionary dynamics. They generally will not be used directly by users.
cat.paleoTS(y) split4punc(y, gg, overlap=TRUE) shifts(ns, ng, minb=5) shift2gg(ss, ns)
y |
a paleoTS object |
gg |
a vector of integers from 1 to the number of segments, indicating for each sample, the segment to which it belongs |
overlap |
if TRUE, the initial sample of each segement starts with the last sample of the previous segment |
ns |
the number of samples in the entire sequence |
ng |
the number of 'groups', i.e., independently evolving evolutionary segments |
minb |
the minimum number of samples to include in a segment |
ss |
an integer, or vector of integers, indicating the index of the initial sample of segments |
Function cat.paleoTS
concatenates a list of multiple paleoTS
objects into a single time-series.
Note that the ages (tt
) of the resulting time-series are read directly from the constituent time-series.
Function split4punc
divides a paleoTS
time-series into separate component time-series according to the grouping vector gg
.
Function shifts
returns a matrix of all allowable shift points for dividing ns
samples into ng
segments, subject to the constraint
that each segement has at least minb
samples. Function shifts2gg
converts a vector of shift points into a grouping vector.
Function cat.paleoTS
returns a single paleoTS
object, and split4punc
returns a list of multiple paleoTS
objects.
Function shifts
returns a matrix of shift points–the index of samples that initiate new segments. This matrix has ng
-1 rows, where the ith row
corresponds to the index of the initial sample for segment i+1. Each column represents one of the possible shift point combinations. Function shift2gg
returns a grouping vector from these initial shift points.
Gene Hunt
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.
fitGpunc
, sim.punc
, opt.GRW.shift
# show all possible shift points for 20 samples divided into two semgments (assuming each has at least 6 samples) GG<- shifts(ns=20, ng=2, minb=6) print (GG) # show resulting grouping vector from first of these gg<- shift2gg(GG[,1], ns=20) print (gg)