intra_physig: Intraspecific variability - Phylogenetic signal

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/intra_physig.R

Description

Performs Phylogenetic signal estimates evaluating trait intraspecific variability

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
intra_physig(
  trait.col,
  data,
  phy,
  V = NULL,
  n.intra = 100,
  distrib = "normal",
  method = "K",
  track = TRUE
)

Arguments

trait.col

The name of a column in the provided data frame with trait to be analyzed (e.g. "Body_mass").

data

Data frame containing species traits with row names matching tips in phy.

phy

A phylogeny (class 'phylo', see ?ape).

V

Name of the column containing the standard deviation or the standard error of the trait variable. When information is not available for one taxon, the value can be 0 or NA.

n.intra

Number of times to repeat the analysis generating a random trait value. If NULL, n.intra = 30

distrib

A character string indicating which distribution to use to generate a random value for the response and/or predictor variables. Default is normal distribution: "normal" (function rnorm). Uniform distribution: "uniform" (runif) Warning: we recommend to use normal distribution with Vx or Vy = standard deviation of the mean.

method

Method to compute signal: can be "K" or "lambda".

track

Print a report tracking function progress (default = TRUE)

Details

This function estimates phylogenetic signal using phylosig. The analysis is repeated n.intra times. At each iteration the function generates a random value for each row in the dataset using the standard deviation or errors supplied and assuming a normal or uniform distribution. To calculate means and se for your raw data, you can use the summarySE function from the package Rmisc.

Output can be visualised using sensi_plot.

Value

The function intra_physig returns a list with the following components:

Trait: Column name of the trait analysed

data: Original full dataset

intra.physig.estimates: Run number, phylogenetic signal estimate (lambda or K) and the p-value for each run with a different simulated datset.

N.obs: Size of the dataset after matching it with tree tips and removing NA's.

stats: Main statistics for signal estimateCI_low and CI_high are the lower and upper limits of the 95

Note

The argument "se" from phylosig is not available in this function. Use the argument "V" instead with intra_physig to indicate the name of the column containing the standard deviation or the standard error of the trait variable instead.

Author(s)

Caterina Penone & Pablo Ariel Martinez & Gustavo Paterno

References

Paterno, G. B., Penone, C. Werner, G. D. A. sensiPhy: An r-package for sensitivity analysis in phylogenetic comparative methods. Methods in Ecology and Evolution 2018, 9(6):1461-1467

Martinez, P. a., Zurano, J.P., Amado, T.F., Penone, C., Betancur-R, R., Bidau, C.J. & Jacobina, U.P. (2015). Chromosomal diversity in tropical reef fishes is related to body size and depth range. Molecular Phylogenetics and Evolution, 93, 1-4

Blomberg, S. P., T. Garland Jr., A. R. Ives (2003) Testing for phylogenetic signal in comparative data: Behavioral traits are more labile. Evolution, 57, 717-745.

Pagel, M. (1999) Inferring the historical patterns of biological evolution. Nature, 401, 877-884.

Kamilar, J. M., & Cooper, N. (2013). Phylogenetic signal in primate behaviour, ecology and life history. Philosophical Transactions of the Royal Society B: Biological Sciences, 368: 20120341.

See Also

phylosig, sensi_plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
data(alien)
alien.data<-alien$data
alien.phy<-alien$phy
# Run sensitivity analysis:
intra <- intra_physig(trait.col = "gestaLen", V = "SD_gesta" ,
                     data = alien.data, phy = alien.phy[[1]])
summary(intra)
sensi_plot(intra)
sensi_plot(intra, graphs = 1)
sensi_plot(intra, graphs = 2)

## End(Not run)

sensiPhy documentation built on April 14, 2020, 7:15 p.m.