- RR
an object produced by RRphylo
. This is not indicated
if convergence among states is tested.
- tree
a phylogenetic tree. The tree needs not to be ultrametric or
fully dichotomous. This is not indicated if convergence among clades is
tested.
- y
a multivariate phenotype. The object y
should be either a
matrix or dataframe with species names as rownames.
- nodes
node pair to be tested. It can be either a vector of two, or a
two-columns matrix/data.frame of node pairs to be tested. Notice the node
number must refer to the dichotomic version of the original tree, as
produced by RRphylo
. If unspecified, the function automatically
searches for convergence among clades.
- state
the named vector of tip states. The function tests for
convergence within a single state or among different states (this latter
case is especially meant to test for iterative evolution as for example the
appearance of repeated morphotypes into different clades). In both cases,
the state for non-focal species (i.e. not belonging to any convergent
group) must be indicated as "nostate".
- aceV
phenotypic values at internal nodes. The object aceV
should be either a matrix or dataframe with nodes (referred to the
dichotomic version of the original tree, as produced by RRphylo
) as
rownames. If aceV
are not indicated, ancestral phenotypes are
estimated via RRphylo
.
- min.dim
the minimum size of the clades to be compared. When
nodes
is indicated, it is the minimum size of the smallest clades in
nodes
, otherwise it is set at one tenth of the tree size.
- max.dim
the maximum size of the clades to be compared. When
nodes
is indicated, it is min.dim
*2 if the largest clade in
nodes
is smaller than this value, otherwise it corresponds to the
size of the largest clade. Without nodes
it is set at one third of
the tree size.
- min.dist
the minimum distance between the clades to be compared. When
nodes
is indicated, it is the distance between the pair. Under the
automatic mode, the user can choose whether time distance or node distance
(i.e. the number of nodes intervening between the pair) should be used. If
time distance has to be considered, min.dist
should be a character
argument containing the word "time" and then the actual time distance to be
used. The same is true for node distance, but the word "node" must precede
the node distance to be used. For example, if the user want to test only
clades more distant than 10 time units, the argument should be "time10". If
clades separated by more than 8 nodes have to be tested, the argument
min.dist
should be "node8". If left unspecified, it automatically
searches for convergence between clades separated by a number of nodes
larger than one tenth of the tree size.
- declust
if species under a given state (or a pair of states) to be
tested for convergence are phylogenetically closer than expected by chance,
trait similarity might depend on proximity rather than true convergence. In
this case, by setting declust = TRUE
, tips under the focal state (or
states) are removed randomly until clustering disappears. A minimum of 3
species per state is enforced to remain anyway.
- nsim
number of simulations to perform sampling within the theta random
distribution. It is set at 1000 by default.
- rsim
number of simulations to be performed to produce the random
distribution of theta values. It is set at 1000 by default.
- clus
the proportion of clusters to be used in parallel computing. To
run the single-threaded version of search.conv
set clus
= 0.