smwda: Split moving-window distance analysis

Description Usage Arguments Details Value Author(s) Examples

View source: R/EcolUtils_functions.R

Description

Split moving-window analysis based on multivariate community data and permutations.

Usage

1
2
smwda(comm.dist.mat, env.var, w.size = 10, nrep = 1000, probs = c(0.025,
  0.975))

Arguments

comm.dist.mat

Dissimilarity matrix.

env.var

Vector representing a continuous environmental variable.

w.size

Windows size (has to be even).

nrep

Number of randomizations for significance computation.

probs

Probabilities for confidence interval calculations.

Details

For each window the data is divided in two halves and the mean distance between samples belonging to a different half is divided by the mean distance between samples belonging to the same half. This is used as an statistic for which nrep null statistics are computed by resampling the order of the distance matrix and significance is computed. A z-score of the statistic is also provided.

Value

List containing: 1) data frame with the mean env.var value of the two central samples of the window, the min and max env.var values of the window, the statistic, its z-score and significance. 2) The mean and two quantiles of the null statistic based on the probs, all the null values and a window-to-sample map.

Author(s)

Guillem Salazar <guillems@ethz.ch>

Examples

1
2
3
4
5
library(vegan)
data("varespec")
data("varechem")
tmp<-smwda(vegdist(varespec),varechem$N)
plot(tmp$windows$env.var.mean,tmp$windows$stat.real.zscore,col=tmp$windows$sign,type="b",pch=19)

GuillemSalazar/EcolUtils documentation built on Nov. 6, 2019, 10:50 a.m.