balanced_sampling: Balanced sampling

View source: R/utils.R

balanced_samplingR Documentation

Balanced sampling

Description

Develops the experimental design based on the provided conditions

Usage

balanced_sampling(
  i,
  Y,
  mm,
  nn,
  YPU,
  H0Sim,
  HaSim,
  resultsHa,
  transformation,
  method
)

Arguments

i

pointer to the index in the list of experimental designs to try.

Y

index to the data.frame the function will work with.

mm

number of site the function is working with in each iteration.

nn

number of samples to consider in each iteration.

YPU

label for the sites in each iteration, as used by sampling::balancedtwostage()

H0Sim

simulated community from SSP::simdata() in which H0 is true.

HaSim

simulated community from SSP::simdata() in which H0 is false.

resultsHa

helper matrix that stores labels and later the results.

transformation

Mathematical function to reduce the weight of very dominant species.

method

appropriate distance/dissimilarity metric (e.g. Gower, Bray–Curtis, Jaccard, etc).

Value

a data frame with values for observed F (for H0 and Ha), and the Ha mean squares for residuals and variation among sites.

Author(s)

Edlin Guerra-Castro (edlinguerra@gmail.com), Arturo Sanchez-Porras

References

Underwood, A. J. (1997). Experiments in ecology: their logical design and interpretation using analysis of variance. Cambridge university press.

See Also

sampling::balancedtwostage()


ecocbo documentation built on Sept. 11, 2024, 8:09 p.m.