Learn R Programming

pez (version 1.2-4)

eco.xxx.regression: eco.xxx.regression

Description

Regression species co-existence against environmental tolerance, trait similarity, or phylogenetic relatedness.

Usage

eco.env.regression(
  data,
  randomisation = c("taxa.labels", "richness", "frequency", "sample.pool",
    "phylogeny.pool", "independentswap", "trialswap"),
  permute = 0,
  method = c("quantile", "lm", "mantel"),
  altogether = TRUE,
  indep.swap = 1000,
  abundance = TRUE,
  ...
)

eco.phy.regression( data, randomisation = c("taxa.labels", "richness", "frequency", "sample.pool", "phylogeny.pool", "independentswap", "trialswap"), permute = 0, method = c("quantile", "lm", "mantel"), indep.swap = 1000, abundance = TRUE, ... )

eco.trait.regression( data, randomisation = c("taxa.labels", "richness", "frequency", "sample.pool", "phylogeny.pool", "independentswap", "trialswap"), permute = 0, method = c("quantile", "lm", "mantel"), altogether = TRUE, indep.swap = 1000, abundance = TRUE, ... )

# S3 method for eco.xxx.regression summary(object, ...)

# S3 method for eco.xxx.regression print(x, ...)

# S3 method for eco.xxx.regression plot(x, ...)

Arguments

data

comparative.comm for analysis

randomisation

null distribution with which to compare your community data, one of: taxa.labels (DEFAULT), richness, frequency, sample.pool, phylogeny.pool, independentswap, trialswap (as implemented in picante)

permute

the number of null permutations to perform (DEFAULT 0)

method

how to compare distance matrices (only the lower triangle;), one of: lm (linear regression), quantile (DEFAULT; quantreg::rq), mantel (mantel)

altogether

use distance matrix based on all traits (default TRUE), or perform separate regressions for each trait (returns a list, see details)

indep.swap

number of independent swap iterations to perform (if specified in randomisation; DEFAULT 1000)

abundance

whether to incorporate species' abundances (default: TRUE)

...

additional parameters to pass on to model fitting functions

object

eco.xxx.regression object

x

eco.xxx.regression object

Author

Will Pearse, Jeannine Cavender-Bares

Details

These methods are similar to those performed in Cavender-Bares et al. (2004). Each function regresses the species co-existence matrix of data (calculated using comm.dist) against either species' trait dissimilarity (eco.trait.regression), species' phylogenetic distance (eco.phy.regression), or species' shared environmental tolerances as measured by Pianka's distance (eco.env.regression).

If altogether is set to FALSE, each trait or environemntal variables in your data will have a separate eco.trait.regression or eco.env.regression applied to it. The functions will return a list of individual regressions; you can either examine/plot them as a group (see examples below), or extract an individual regression and work with that. These lists are of class eco.xxx.regression.list; a bit messy, but it does work!...

References

Cavender-Bares J., Ackerly D.D., Baum D.A. & Bazzaz F.A. (2004) Phylogenetic overdispersion in Floridian oak communities. The Americant Naturalist 163(6): 823--843.

Kembel, S.W., Cowan, P.D., Helmus, M.R., Cornwell, W.K., Morlon, H., Ackerly, D.D., Blomberg, S.P. & Webb, C.O. Picante: R tools for integrating phylogenies and ecology. Bioinformatics 26(11): 1463--1464.

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

See Also

fingerprint.regression phy.signal

Examples

Run this code
data(laja)
#We wouldn't recommend only using ten permutations - this is just for speed!
data <- comparative.comm(invert.tree, river.sites, invert.traits, river.env)
eco.trait.regression(data, permute=10)
#Specify additional options
eco.trait.regression(data, tau=c(0.25,0.5,0.75), permute=10)
plot(eco.trait.regression(data, permute=10, method="lm"))
plot(eco.trait.regression(data, permute=10, method="lm", altogether=FALSE))

Run the code above in your browser using DataLab