Rev Language Reference


mvNNI - Nearest Neighbor Interchange (NNI) move.

Tree topology move that performs a Nearest Neighbor Interchange (NNI) on a rooted or unrooted tree.

Usage

mvNNI(TimeTree tree, RealPos weight, Probability tuneTarget)

Arguments

tree : TimeTree (<stochastic> pass by reference)
The tree on which this move operates.
weight : RealPos (pass by value)
The weight determines the relative frequency with which this move will be attempted. For details, see the description of the 'moveschedule' parameter on the documentation page for 'mcmc()'.
Default : 1
tuneTarget : Probability (pass by value)
The acceptance probability targeted by auto-tuning.
Default : 0.44

Details

`mvNNI` changes tree topology by interchanging the positions of two subtrees around an internal branch. For each selected internal edge, the move considers two alternative topologies. As there are (n - 3) internal edges in an unrooted tree of n taxa, every such tree has (2n - 6) NNI "neighbors" that are one NNI move away. This neighborhood is smaller than that induced by more complex topology moves such as `mvSPR`. As a result, `mvNNI` is computationally cheaper than `mvSPR` and will often exhibit higher acceptance rates, but explores tree space less thoroughly and is more likely to get stuck in local optima (resulting in poor mixing). The RevBayes implementation of the NNI move can be applied to both `BranchLengthTree` and `TimeTree` objects.

Example

taxa <- v(taxon("A"), taxon("B"), taxon("C"), taxon("D"), taxon("E"), taxon("F"))
height ~ dnUniform(0, 10)
moves = VectorMoves()

# Apply the NNI move to an unrooted BranchLengthTree
bltree ~ dnUniformTopology(taxa)
moves.append( mvNNI(tree=bltree, weight=taxa.size()) )

# Apply the NNI move to a rooted TimeTree
timetree ~ dnUniformTimeTree(rootAge=height, taxa=taxa)
moves.append( mvNNI(tree=timetree, weight=taxa.size()) )

See Also