zinit {AHMbook} | R Documentation |
Starting values for survival analysis in JAGS/BUGS
Description
Generates a matrix for use as starting values for the survival indicator in a JAGS or BUGS model for survival analysis, traditionally designated z
.
Usage
zinit(CH)
Arguments
CH |
An individuals x time matrix of capture records, 1 if captured, 0 otherwise, no missing values. |
Value
An individuals x time matrix with 1 in each row after the first capture; all other elements NA, including the first capture occasion.
Author(s)
Marc Kéry & Andy Royle
References
Kéry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 3.2.3.
Examples
# Generate a fake capture history
( ch <- matrix(rbinom(30, 1, 0.5), 6, 5) )
zinit(ch)
[Package AHMbook version 0.2.9 Index]