pcps.curve: Curve of phylogenetic signal at metacommunity level

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

View source: R/pcps.curve.R

Description

The function estimate the phylogenetic signal at metacommunity level and draws a representation curve.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pcps.curve(
  comm,
  phylodist,
  trait,
  checkdata = TRUE,
  method = "bray",
  squareroot = TRUE,
  ranks = TRUE,
  null.model.ts = FALSE,
  null.model.bm = FALSE,
  tree,
  runs = 99,
  progressbar = FALSE,
  parallel = NULL
)

pcpc.curve.calc(values, vectors, mt)

## S3 method for class 'pcpscurve'
plot(
  x,
  draw.model = c("none", "ts", "bm"),
  type = "b",
  probs = c(0.025, 0.975),
  col = "black",
  model.col = "black",
  ...
)

## S3 method for class 'pcpscurve'
print(x, ...)

## S3 method for class 'pcpscurve'
summary(object, probs = c(0.025, 0.975), ...)

Arguments

comm

Community data, with species as columns and sampling units as rows. This matrix can contain either presence/absence or abundance data. Alternatively comm can be an object of class metacommunity.data, an alternative way to set all data.frames/matrices. When you use the class metacommunity.data the arguments trait and phylodist must not be specified. See details.

phylodist

Matrix containing phylogenetic distances between species.

trait

Matrix data of species described by traits, with traits as columns and species as rows.

checkdata

Logical argument (TRUE or FALSE) to check if species sequence in the community data follows the same order as the one in the trait and in the phylodist matrices (Default checkdata = TRUE).

method

Dissimilarity index, as accepted by vegdist (Default dist = "bray").

squareroot

Logical argument (TRUE or FALSE) to specify if use square root of dissimilarity index (Default squareroot = TRUE).

ranks

Logical argument (TRUE or FALSE) to specify if ordinal variables are convert to ranks (Default ranks = TRUE).

null.model.ts

Logical argument (TRUE or FALSE) to specify if use null model that shuffles terminal tips across the phylogenetic tree to generate null curves. See details (Default null.model.ts = FALSE).

null.model.bm

Logical argument (TRUE or FALSE) to specify if use null model that simulate trait evolving under Brownian motion to generate null curves. See details (Default null.model.bm = FALSE).

tree

Phylogenetic tree, as phylo object.

runs

Number of randomizations.

progressbar

Logical argument (TRUE or FALSE) to specify if display a progress bar on the R console (Default progressbar = FALSE).

parallel

Number of parallel processes or a predefined socket cluster done with parallel package. Tip: use detectCores() (Default parallel = NULL).

values

The eigenvalues, relative eigenvalues and cumulative relative eigenvalues returned by pcps.

vectors

The principal coordinates of phylogenetic structure returned by pcps.

mt

Matrix containing trait average at community level for one trait.

x

An object of class pcpscurve.

draw.model

Type of null model to draw; none (none), taxa shuffle (ts), browian motion model (bm).

type

Type of the plot to be drawn (Default type = "b").

probs

Numeric vector of probabilities used by quantile. (Default probs = c(0.025, 0.975)).

col

Plot color.

model.col

Color of lines of null models.

...

Further graphical parameters for points.

object

An object of class pcpscurve.

Details

The sequence species show up in the community data matrix must be the same as they show up in the phylogenetic distance matrix and in traits matrix. The function organize.pcps organizes the data, placing the matrices of community and phylogenetic distance and trait in the same order. The function use of function organize.pcps is not requered for run the functions, but is recommended. In this way the arguments comm and phylodist can be specified them as normal arguments or by passing them with the object returned by the function organize.pcps using, in this case only the argument comm. Using the object returned by organize.pcps, the comm argument is used as an alternative way of entering to set all data.frames/matrices, and therefore the arguments phylodist and trait must not be specified.

The PCPS are used, in a sequential manner, as predictors in a linear regression to model the trait averages across the metacommunity. The curve is drawn as the percentage of cumulative eigenvalues in the abscissa and as the determination coefficient of regressions in the ordinate.

Two null models are available. The first one (ts), the null curves are generated shuffling terminal tips across the phylogenetic tree, generates a set of random PCPS and recalculates the curves. The second (bm), the null curves are generated with simulate traits evolving under Brownian motion model.

Value

curve.obs

The cumulative PCPS eigenvalues and the coefficient of determination.

curve.null.ts

The cumulative PCPS eigenvalues and the coefficient of determination for each randomization using the taxa shuffle null model.

curve.null.bm

The cumulative PCPS eigenvalues and the coefficient of determination for each randomization using the Brownian motion null model.

Note

IMPORTANT: The sequence of species in the community data matrix MUST be the same as that in the phylogenetic distance matrix and in traits matrix. See details and organize.pcps.

Author(s)

Vanderlei Julio Debastiani <vanderleidebastiani@yahoo.com.br>

References

Duarte, L.S. (2011). Phylogenetic habitat filtering influences forest nucleation in grasslands. Oikos, 120, 208:215.

See Also

matrix.p, pcps

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(flona)
res<-pcps.curve(flona$community, flona$phylo, flona$trait[,1,drop = FALSE], 
       null.model.ts = TRUE, runs = 9)
res
summary(res)
plot(res, draw.model = "ts", type = "b", col = "red")

## End(Not run)

PCPS documentation built on Jan. 16, 2020, 1:03 a.m.

Related to pcps.curve in PCPS...