phyloSim: Simulate the behaviour of phylogenetic signal statistics with...

View source: R/phyloSim.R

phyloSimR Documentation

Simulate the behaviour of phylogenetic signal statistics with a given phylogeny

Description

This function simulates different phylogenetic signal statistics for a given phylogenetic tree along a gradient of Brownian Motion influence.

Usage

phyloSim(
  tree,
  methods = c("all", "I", "Cmean", "Lambda", "K", "K.star"),
  nsim = 99,
  reps = 999,
  W = NULL,
  model = "BM",
  pb = TRUE
)

Arguments

tree

a phylo, phylo4 or phylo4d object.

methods

a character vector giving the methods to compute phylogenetic signal (see Details).

nsim

a numeric value. Number of simulated traits at each step in the gradient.

reps

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

W

an optional matrix of phylogenetic weights to compute Moran's I. By default the matrix is computed with the function proxTips with patristic distances.

model

the model to use for traits simulation (only "BM", default, is available).

pb

a logical. Should a progress bar be printed? (default TRUE).

Details

By default, the methods argument is set to "all" and all the available methods are used. The user can specify which method(s) to use. Possible values are "I", "Cmean", "Lambda", "K" and "K.star", see phyloSignal for further details.

Value

An object of class phylosim.

See Also

phyloSimSignal.

Examples

## Not run: 
data(navic)
psim <- phyloSim(navic)
plot(psim)
plot.phylosim(psim, what = "pval", stacked.methods = TRUE)

## End(Not run)


fkeck/phylosignal documentation built on Oct. 15, 2023, 2:57 a.m.