plot_power: Power curves for different sampling efforts

View source: R/plot_power.R

plot_powerR Documentation

Power curves for different sampling efforts

Description

plot_power() can be used to visualize the power of a study as a function of the sampling effort. The power curve plot shows that the power of the study increases as the sample size increases, and the density plot shows the overlapping areas where \alpha and \beta are significant.

Usage

plot_power(data, n = NULL, m = NULL, method = "power")

Arguments

data

Object of class "ecocbo_beta" that results from sim_beta().

n

Defaults to NULL, and then the function computes the number of samples 'n', within the selected 'm', that result in a sampling effort close to (1 - alpha) in power. If provided, said number of samples will be used.

m

Defaults to NULL, and then the function computes the number of sites 'm' that result in a sampling effort that is close to (1 - alpha) in power. If provided, said number of site will be used.

method

The desired plot. Options are "power", "density" or "both". "power" plots the power curve, "density" plots the density distribution of pseudoF, and "both" draws both plots one next to the other.

Value

If the method is "power", then the power curves for the different values of 'm'. The selected, or computed, 'n' is marked in red. If the method is "density", then a density plot for the observed pseudoF values and a line marking the value of pseudoF that marks the significance level indicated in sim_beta(). If the method is "both", then a composite with power curves and a density plot side by side.

The value of the selected 'm', 'n' and the corresponding component of variation are presented in all methods.

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.

See Also

sim_beta() scompvar() sim_cbo() prep_data()

Examples

epiBetaR <- sim_beta(simResults, alpha = 0.05)

plot_power(data = epiBetaR, n = NULL, m = 3, method = "power")
plot_power(data = epiBetaR, n = NULL, m = 3, method = "density")
plot_power(data = epiBetaR, n = 4, m = 3, method = "both")

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