balanced_sampling2: Balanced sampling 2

View source: R/utils.R

balanced_sampling2R Documentation

Balanced sampling 2

Description

Develops the experimental design based on the provided conditions

Usage

balanced_sampling2(
  i,
  Y,
  mm,
  nn,
  YPU,
  H0Sim,
  HaSim,
  factEnv,
  resultsHa,
  transformation,
  method,
  model,
  nSect,
  sites,
  N
)

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).

model

which algorithm to use for the calculation? At the moment, the only option is "nested.symmetric".

nSect

Total number of sectors to be simulated in each data set.

sites

Total number of sites to be simulated in each data set.

N

Total number of samples to be simulated in each site.

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.