Resample trees using Jackknife resampling, i.e. removing a subset of characters.
Usage
Jackknife(
tree,
dataset,
resampleFreq = 2/3,
InitializeData = PhyDat2Morphy,
CleanUpData = UnloadMorphy,
TreeScorer = MorphyLength,
EdgeSwapper = TBRSwap,
jackIter = 5000L,
searchIter = 4000L,
searchHits = 42L,
verbosity = 1L,
...
)
Arguments
- tree
A tree of class
phylo
.- dataset
a dataset in the format required by
TreeScorer()
.- resampleFreq
Double between 0 and 1 stating proportion of characters to resample.
- InitializeData
Function that sets up data object to prepare for tree search. The function will be passed the
dataset
parameter. Its return value will be passed toTreeScorer()
andCleanUpData()
.- CleanUpData
Function to destroy data object on function exit. The function will be passed the value returned by
InitializeData()
.- TreeScorer
function to score a given tree. The function will be passed three parameters, corresponding to the
parent
andchild
entries of a tree's edge list, and a dataset.- EdgeSwapper
a function that rearranges a parent and child vector, and returns a list with modified vectors; for example
SPRSwap()
.- jackIter
Integer specifying number of jackknife iterations to conduct.
- searchIter
Integer specifying maximum rearrangements to perform on each bootstrap or ratchet iteration. To override this value for a single swapper function, set e.g.
attr(SwapperFunction, "searchIter") <- 99
- searchHits
Integer specifying maximum times to hit best score before terminating a tree search within a ratchet iteration. To override this value for a single swapper function, set e.g.
attr(SwapperFunction, "searchHits") <- 99
- verbosity
Numeric specifying level of detail to display in console: larger numbers provide more verbose feedback to the user.
- ...
further arguments to pass to
TreeScorer()
, e.g.dataset =
.
Details
The function assumes
that InitializeData()
will return a morphy object; if this doesn't hold
for you, post a GitHub issue
or e-mail the maintainer.
See also
JackLabels()
: Label nodes of a tree with jackknife supports.
Other split support functions:
JackLabels()
,
MaximizeParsimony()
,
SiteConcordance
Other custom search functions:
EdgeListSearch()
,
MorphyBootstrap()
,
SuccessiveApproximations()