View source: R/dataSimulation.R
simDat63 | R Documentation |
Simulate wingspan measurements in female and male peregrines with unequal variance.
simDat63(n1 = 60, n2 = 40, mu1 = 105, mu2 = 77.5, sigma1 = 3, sigma2 = 2.5)
n1 |
The sample size of females |
n2 |
The sample size of males |
mu1 |
The population mean males |
mu2 |
The population mean females |
sigma1 |
The standard deviation for females |
sigma2 |
The standard deviation for males |
A list of simulated data and parameters.
n1 |
Female sample size |
n2 |
Male sample size |
mu1 |
Female mean |
mu2 |
Male mean |
beta |
Difference in wingspan mean between sexes |
sigma1 |
Standard deviation for females |
sigma2 |
Standard deviation for males |
x |
Indicator variable for sex, 1 = male |
y |
Simulated wingspan data |
Marc Kéry
str(dat <- simDat63()) # Implicit default arguments
str(dat <- simDat63(sigma1 = 5, sigma2 = 1)) # Very unequal variances
# Much larger sample sizes and larger difference in residual variation
str(dat <- simDat63(n1 = 10000, n2 = 10000, sigma1 = 5, sigma2 = 2))
# Revert to model with homoscedasticity
str(dat <- simDat63(n1 = 10000, n2 = 10000, sigma1 = 5, sigma2 = 5))
# Revert to "model-of-the-mean" (with larger sample size)
str(dat <- simDat63(n1 = 10000, n2 = 10000, mu1 = 105, mu2 = 105, sigma1 = 5, sigma2 = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.