phyloCorrelogram: Phylogenetic correlogram

View source: R/correlogram.R

phyloCorrelogramR Documentation

Phylogenetic correlogram

Description

This function computes a phylogenetic correlogram.

Usage

phyloCorrelogram(
  p4d,
  trait = names(tdata(p4d)),
  dist.phylo = "patristic",
  sigma = NULL,
  n.points = 100,
  ci.bs = 1000,
  ci.conf = 0.95
)

Arguments

p4d

a phylo4d object.

trait

the traits in the phylo4d object to use for the correlogram. Can be a character vector giving the name of the traits or numbers giving the column index in the table of the data slot of the phylo4d object.

dist.phylo

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

sigma

a numeric value giving the standard deviation of the normal distribution used to compute the matrix of phylogenetic weights. If NULL (default), the function computes a value from the phylogeny.

n.points

an integer giving the number of points at which to compute the correlogram's statistics.

ci.bs

an integer giving the number of bootstrap replicates for confidence interval estimation.

ci.conf

a value between 0 and 1 giving the confidence level of the confidence interval.

Details

This function computes a correlogram on a continuous scale of phylogenetic distance. This is achieved by using a collection of specific phylogenetic weights matrices generated with the "lag-norm" method of phyloWeights and different values of "mu".

The confidence envelope is computed by bootstrapping. At each iteration, the autocorrelation is re-estimated after re-standardization of the matrix of phylogenetic weights. The nonparametric confidence intervals are computed at each lag by first order normal approximation. Intervals are constrained between 0 and 1.

If there is one trait, the function computes Moran's I. If there is more than one trait, the function computes the Mantel's statistic (Oden and Sokal 1986).

If "dist.phylo" is a character string, the phylogenetic distance matrix is computed internally using the function distTips from the package adephylo. See distTips for details about the methods.

Value

An object of class "phylocorrelogram".

References

Oden N.L. & Sokal R.R. (1986) Directional Autocorrelation: An Extension of Spatial Correlograms to Two Dimensions. Systematic Zoology 35, 608-617.

See Also

plot.phylocorrelogram, correlogram.formula in ape for correlograms based on taxonomic levels.

Examples

## Not run: 
data(navic)
pc <- phyloCorrelogram(navic)
plot(pc)

## End(Not run)

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