View source: R/dataSimulation.R
simDat73 | R Documentation |
Simulate snout-vent length measurements of nSample smooth snakes in each of nPops populations. Data are simulated under the assumptions of a model with random effects of populations
simDat73(nPops = 10, nSample = 12, pop.grand.mean = 50, pop.sd = 3, sigma = 5)
nPops |
Number of populations |
nSample |
Samples from each population |
pop.grand.mean |
Mean of population means (hyperparameter) |
pop.sd |
Standard deviation of population means (hyperparameter) |
sigma |
Value for the residual standard deviation |
A list of simulated data and parameters.
nPops |
Number of populations |
nSample |
Number of samples per population |
pop.grand.mean |
Mean of population means |
pop.sd |
SD of population means |
sigma |
Residual SD |
pop |
Indicator for population number |
pop.means |
Simulated population means |
eps |
Simulated residuals |
y |
Simulated lengths |
Marc Kéry
str(dat <- simDat73()) # Implicit default arguments
# More pops, more snakes in each, more among-population variability
str(dat <- simDat73(nPops = 20, nSample = 30, pop.sd = 8))
# Revert to "model-of-the-mean" (larger sample size to minimize sampling variability)
str(dat <- simDat73(nSample = 1000, pop.sd = 0, sigma = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.