getInitValues: Modify the init object depending on the type of model we are...

View source: R/getInitValues.R

getInitValuesR Documentation

Modify the init object depending on the type of model we are running

Description

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.

Usage

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


BiologicalRecordsCentre/sparta documentation built on June 12, 2024, 4:11 a.m.