Last data update: 2014.03.03

R: Unordered Fitch parsimony reconstruction of discrete...
fitch.mvslR Documentation

Unordered Fitch parsimony reconstruction of discrete character states

Description

Implements an unordered Fitch parsimony reconstruction of discrete niche variables for use in the OU models where optima are modeled on discrete, categorical niche encodings. Allows for delayed and accelerated transformations to deal with ambiguities. Function was originally the fitch function from the slouch package.

Usage

fitch.mvsl(phyltree, niche, deltran = FALSE, acctran = FALSE, root = NULL)

Arguments

phyltree

The phylogenetic tree in ouch format.

niche

The specific niche variable in the slouch data.frame to be reconstructed, entered as data.frame$niche

deltran

Implements a delayed transformation algorithm in order to deal with ambiguous nodes

acctran

Implements an accelerated transformation algorithm to deal with ambiguous nodes

root

An optional argument allowing the user to define a character state for the root (useful if the root node is ambiguously reconstructed)

Details

The fitch.mvsl function is meant to be interactive, where the user acts on the advice given in the returned messages whilst attempting to reconstruct ancestral states. If the root node is ambiguous after an initial reconstruction (a message will be printed to the screen if this is the case), this needs to be set by the user using the root = "state" argument in the function call. Any remaining ambiguous nodes can then be dealt with by specifying deltran or acctran ="TRUE" in the function call

Value

The fitch.mvsl function returns a vector of reconstructed character states.

Author(s)

Jason Pienaar jasonpienaar@gmail.com

References

Fitch, M.W. (1971) Defining the course of Evolution: Minimum change for a specific tree topology. Systematic Zoology 20:406–416.

Swofford, D. L. and W.P. Maddison (1987) Reconstructing ancestral character states under Wagner parsimony. Mathematical Biosciences 87: 199–229.

See Also

slouch::fitch, slouch::slouchtree.plot, slouch::model.fit, slouch::ouch2slouch

Examples

phyltree<-ape2ouch(rtree(5))
phyltree@nodelabels[1:(phyltree@nnodes-phyltree@nterm)]<-as.character(
1:(phyltree@nnodes-phyltree@nterm))

regimes<-c("A","B","B","C","C")
regimesFitch<-fitch.mvsl(phyltree,regimes,root=1,deltran=TRUE)

Results