This function is primarily for internal use within occDetFunc. It is used to update the initial values object according to the needs of each model type.

getInitValues(init, modeltype, verbose = FALSE)

Arguments

init

An initial values object. As a minimum this is a list defined in occDetFunc as list(z = z, alpha.p = rep(runif(1, -2, 2), nTP), a = rep(runif(1, -2, 2), nTP), eta = rep(runif(1, -2, 2), bugs_data$nsite)). Where z is 1's/0's for whether the focal species is present, alpha.p is the initial values for detectability in each year, a is the inital values for the occupancy probability in each year, eta is the initial values for the site random effects.

modeltype

Character, one of: intercept, centering, contlistlength. See occDetFunc for more information.

verbose

Logical, if true progress is reported to the console

Value

An updated init (initial values) object