fuzzyqBoot {FuzzyQ}R Documentation

Apply Fuzzy Quantification of Common and Rare Species to Bootstrap Replicates

Description

Produce N replicates of the original site by species matrix or dataframe by taking bootstrap samples of sites (rows) and apply fuzzyq to each replicate.

Usage

fuzzyqBoot(
  M,
  N = 1000,
  level = "spp",
  std = FALSE,
  rm.absent = FALSE,
  wgts = c(1, 1),
  ...
)

Arguments

M

A matrix or dataframe of species abundaces (columns). Each row represents a site.

N

Integer. Number of bootstrap replicates desired. Default is 1,000.

level

String. Specifiy the type of metrics to be computed for each bootstrap replicate. Either "spp" or "global", corresponding to species or community-level metrics, respectively.

std

Logical. Whether or not the measurements of occupancy and abundance are to be standardized before calculating the dissimilarities. Measurements are standardized for each variable (column), by subtracting the variable's mean value and dividing by the variable's mean absolute deviation. It only takes effect if diss is different from "gower".

rm.absent

Logical. Whether or not absent species are to be removed from the calculations.

wgts

an optional numeric vector of length 2. To be used if diss = "gower", specifying weights for occupancy and abundance, respectively. Default is c(1, 1) as in Gower's original formula.

...

Arguments to be passed to function fanny in package cluster.

Value

A list consisting of the following:

bs.rep

Matrix of estimated metrics. Replicates are arranged in rows. If level = "spp", columns represent estimates of Commonness Indices per species. If level = "global", columns represent estimates of community-level clustering metrics: Average silhouette widths per cluster and globally, Mean commonness indices per cluster and Normalized Dunn's coefficient.

level

Flag indicating whether the estimates are taken at species ("spp") or community level ("global").

Examples

data(antsA)
FQAnts <- fuzzyq(antsA, sorting = TRUE)

# Compute species Commonness Indices of species of 1,000 bootstrap
# replicates:
BS.FQAnts <- fuzzyqBoot (antsA, N = 1e3, level='spp')

# Compute global metrics of 1,000 boostrap replicates:
BS.global <- fuzzyqBoot (antsA, N = 1e3, level='global')

[Package FuzzyQ version 0.1.0 Index]