simDat5 {ASMbook} | R Documentation |
Simulate data for Chapter 5: Simple linear regression
Description
Simulate percent occupancy population trajectory of Swiss Wallcreepers from a normal distribution. Note that other choices of arguments may lead to values for x and y that no longer make sense in the light of the story in Chapter 5 (i.e., where y is a percentage), but will still be OK for the statistical model introduced in that chapter.
Usage
simDat5(n = 16, a = 40, b = -0.5, sigma2 = 25)
Arguments
n |
The sample size |
a |
Value for the intercept |
b |
Value for the slope |
sigma2 |
Value for the residual variance |
Value
A list of simulated data and parameters.
n |
Sample size |
a |
Intercept |
b |
Slope |
sd |
Residual SD |
y |
Simulated wallcreeper occupancy probabilities |
Author(s)
Marc Kéry
Examples
str(dat <- simDat5()) # Implicit default arguments
str(dat <- simDat5(b = 0)) # Stable population (this is a de-facto "model-of-the-mean")
str(dat <- simDat5(b = 0.5)) # Expected increase
[Package ASMbook version 1.0.2 Index]