Weiser, E. L., 2018, Simulation-based power analysis code: U.S. Geological Survey data release, https://doi.org/10.5066/P9SFUH2K.
Summary
This script simulates data for population surveys (e.g., the density of individuals per some unit of area) and fits a model to the simulated data to determine whether the population trend can be detected. The script tests one replicate of one scenario. This example takes lt 1 sec to run on a modern laptop computer. For each scenario, the process would be repeated over a series of replicates (e.g., 100 or 500), and then the proportion of replicates in which the trend was detected would be tallied. That proportion indicates the statistical power. Additional scenarios are then tested by changing the input parameters provided below.
Summary
This script simulates data for population surveys (e.g., the density of individuals per some unit of area) and fits a model to the simulated data to determine whether the population trend can be detected. The script tests one replicate of one scenario. This example takes lt 1 sec to run on a modern laptop computer.
For each scenario, the process would be repeated over a series of replicates (e.g., 100 or 500), and then the proportion of replicates in which the trend was detected would be tallied. That proportion indicates the statistical power. Additional scenarios are then tested by changing the input parameters provided below.