This function computes Local Indicator of Phylogenetic Association (local Moran's I) for each tip of a tree. Tests are based on permutations.
lipaMoran(
p4d,
trait = names(tdata(p4d)),
reps = 999,
alternative = "greater",
prox.phylo = "patristic",
as.p4d = FALSE
)If as.p4d is FALSE (default), the function returns a list:
A matrix of LIPA indices computed for each tip of the tree and each trait.
A matrix of p-values (tests of LIPA indices)
Number of permutations for the tests
Alternative hypothesis for the tests
If as.p4d is TRUE, the function returns a phylo4d object
with LIPA values as tips associated data.
a phylo4d object.
the traits in the phylo4d object for which to compute LIPA.
Can be a character vector giving the name of the traits
or numbers giving the column in the table of the data slot of the phylo4d object.
a numeric value. Number of repetitions for the estimation of p.values with randomization.
a character string specifying the alternative hypothesis for the tests.
Must be one of greater (default), two-sided or less.
a matrix of phylogenetic proximities or a character string specifying a method to compute it. See Details.
logical. Should the results returned as a phylo4d object?
If "prox.phylo" is a character string,
the phylogenetic proximity matrix is computed internally
using the function proxTips from the package adephylo.
Different methods are available:
"patristic","nNodes","Abouheif" and "sumDD".
See proxTips for details about the methods.
Anselin L. (1995) Local Indicators of Spatial Association-LISA. Geographical Analysis 27, 93-115.