Description Usage Arguments Details Value Author(s) References See Also
ouSim
simulates the evolution of a single character for visualization purposes; for parametric bootstrapping,
utilize the simulate
methods in ouch.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ouSim(object, ...)
## S3 method for class 'phylo'
ouSim(object, rootState = 0, shiftBranches = NULL, shiftStates = NULL,
sqrt.alpha = 0, variance = 1, theta = rootState, model = "OU",
branchMeans = NULL, steps = 1000, ...)
## S3 method for class 'ouchtree'
ouSim(object, rootState = 0, sqrt.alpha = 0, variance = 1,
theta = rootState, steps = 1000, ...)
## S3 method for class 'browntree'
ouSim(object, ...)
## S3 method for class 'hansentree'
ouSim(object, ...)
## S3 method for class 'hansenBatch'
ouSim(object, ...)
## S3 method for class 'hansenSummary'
ouSim(object, tree, treeNum = 1, rootState = NULL, ...)
|
object |
In a call to the generic function, an object of class phylo, ouchtree, browntree, hansentree, hansenBatch, or hansenSummary. |
rootState |
The character state at the root of the tree. In a |
shiftBranches |
For a |
shiftStates |
For a |
sqrt.alpha |
The rate of evolution toward an equilibrium or optimum. This term is refered to as the rate of evolution by Hansen (1997)
and the strength of selection by Butler and King (2004). It is a multiplier by the difference between the character state and the
character state optimum. Alpha can be submitted as a single value applied to all branches or as a vector corresponding to branches
in the |
variance |
The variance on the stochastic portion of the Ornstein-Uhlenbeck model.
This parameter is taken from the analysis results for |
theta |
The character state optimum. |
model |
For a |
branchMeans |
For a |
steps |
The number of slices into which the tree is divided for simulation. |
tree |
The |
treeNum |
In a |
... |
Additional arguments to be passed along to |
A call to ouSim
detects the class of object
and behaves as follows:
phylo
With an ape-style tree, all parameters of the model are specified by branch. Most flexibility, least convenience.
ouchtree
With an ouch-style (S4) tree, again, all parameters of the model are specified by branch.
Somewhat less flexibility than ouSim.phylo
but all the pain. Typically just called by the next two methods.
browntree
All Brownian motion model parameters and tree are extracted from the browntree
object.
hansentree
All Ornstein-Uhlenbeck model parameters and tree are extracted from the hansentree
object.
Only the first regime is utilized.
hansenBatch
Model-averaged parameters from the hansenBatch
object are used for analysis.
One of the trees used for analysis must be provided, and a corresponding tree number must be provided so that
branches are indexed correctly.
hansenSummary
Behaves exactly like a hansenBatch
object.
ouSim.phylo
A very basic simulation engine, but also the most flexible. As written, the user has to specify the
model using two vectors that correspond to the branches in an ape
-format tree. It is important to note that
this simulation method is really a heuristic device, not appropriate for estimating parameter distributions. For
analysis purposes, you should utilize the simulate
and bootstrap
methods in ouch.
A list of class 'ouSim' that describes the phenotype at the beginning and end of each branch segment, as well as the model.
Andrew Hipp ahipp@mortonarb.org
Hansen, T.F. (1997) Stabilizing selection and the comparative analysis of adaptation. Evolution 51:1341-1351.
Butler, M. and A.A. King. (2004) Phylogenetic comparative analysis: a modeling approach for adaptive evolution. American Naturalist 164:683-695.
plot.ouSim
for visualizing simulation; carex
for examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.