sim_beta: Calculate beta and power out of simulated samples

View source: R/sim_beta.R

sim_betaR Documentation

Calculate beta and power out of simulated samples

Description

sim_beta() can be used to assess the power of a study by comparing the variation when one can assume whether an ecological community does not have composition differences (H0 true) or it does (H0 false). For example, if the beta error is 0.25, then there is a 25% chance of failing to detect a difference even if the difference is real. The power of the study is 1 - \beta, so in this example, the power of the study is 0.75.

Usage

sim_beta(data, alpha = 0.05)

Arguments

data

An object of class "ecocbo_data" that results from applying prep_data() to a community data frame.

alpha

Level of significance for Type I error. Defaults to 0.05.

Value

sim_data() returns an object of class "ecocbo_beta".

The function print() is used to present a matrix that summarizes the results by showing the estimate power according to different sampling efforts.

An object of class "ecocbo_beta" is a list containing the following components:

  • $Power a data frame containing the estimation of power and beta for several combination of sampling efforts (m sites and n samples).

  • $Results a data frame containing the estimates of pseudoF for simH0 and simHa.

  • $alpha level of significance for Type I error.

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.

Underwood, A. J., & Chapman, M. G. (2003). Power, precaution, Type II error and sampling design in assessment of environmental impacts. Journal of Experimental Marine Biology and Ecology, 296(1), 49-70.

Anderson, M. J. (2014). Permutational multivariate analysis of variance (PERMANOVA). Wiley statsref: statistics reference online, 1-15.

Guerra‐Castro, E. J., Cajas, J. C., Simões, N., Cruz‐Motta, J. J., & Mascaró, M. (2021). SSP: an R package to estimate sampling effort in studies of ecological communities. Ecography, 44(4), 561-573.

See Also

plot_power() scompvar() sim_cbo() prep_data() SSP::assempar() SSP::simdata()

Examples

sim_beta(data = simResults, alpha = 0.05)


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