lipaMoran: Local Indicator of Phylogenetic Association

View source: R/lipa.R

lipaMoranR Documentation

Local Indicator of Phylogenetic Association

Description

This function computes Local Indicator of Phylogenetic Association (local Moran's I) for each tip of a tree. Tests are based on permutations.

Usage

lipaMoran(
  p4d,
  trait = names(tdata(p4d)),
  reps = 999,
  alternative = "greater",
  prox.phylo = "patristic",
  as.p4d = FALSE
)

Arguments

p4d

a phylo4d object.

trait

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.

reps

a numeric value. Number of repetitions for the estimation of p.values with randomization.

alternative

a character string specifying the alternative hypothesis for the tests. Must be one of greater (default), two-sided or less.

prox.phylo

a matrix of phylogenetic proximities or a character string specifying a method to compute it. See Details.

as.p4d

logical. Should the results returned as a phylo4d object?

Details

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.

Value

If as.p4d is FALSE (default), the function returns a list:

lipa

A matrix of LIPA indices computed for each tip of the tree and each trait.

p.value

A matrix of p-values (tests of LIPA indices)

reps

Number of permutations for the tests

alternative

Alternative hypothesis for the tests

If as.p4d is TRUE, the function returns a phylo4d object with LIPA values as tips associated data.

References

Anselin L. (1995) Local Indicators of Spatial Association-LISA. Geographical Analysis 27, 93-115.


phylosignal documentation built on Oct. 12, 2023, 5:13 p.m.