Learn R Programming

marked (version 1.2.8)

setup.parameters: Setup parameter structure specific to model (internal use)

Description

Defines list of parameters used in the specified type of model (model) and adds default values for each parameter to the list of user specified values (eg formula, link etc).

Usage

setup.parameters(
  model,
  parameters = list(),
  nocc = NULL,
  check = FALSE,
  number.of.groups = 1
)

Value

The return value depends on the argument check. If it is TRUE then the return value is a vector of the names of the parameters used in the specified type of model. For example, if model="CJS" then the return value is c("Phi","p"). This is used by the function valid.parameters to make sure that parameter specifications are valid for the model (i.e., specifying recovery rate r for "CJS" would give an error). If the function is called with the default of check=FALSE, the function returns a list of parameter specifications which is a modification of the argument parameters which adds parameters not specified and default values for all types of parameters that were not specified. The list length and names of the list elements depends on the type of model. Each element of the list is itself a list with varying numbers of elements which depend on the type of parameter although some elements are the same for all parameters. Below the return value list is shown generically with parameters named p1,...,pk.

p1List of specifications for parameter 1
p2List of specifications for parameter 2
.
.
.
pkList of specifications for parameter k

The elements for each parameter list all include:

begin0 or 1; beginning time for the first
parameter relative to first occasion
num0 or -1; number of parameters relative to
number of occassions
typetype of PIM structure; either "Triang" or "Square"
formulaformula for parameter model (e.g., ~time)
linklink function for parameter (e.g., "logit")

and may include:

shareonly valid for p in closed capture models;
if TRUE p and c models shared
mixonly valid for closed capture heterogeneity
models; if TRUE mixtures are used
rowsonly valid for closed capture heterogeneity models
fixedfixed values specified by user and
not used modified in this function

Arguments

model

type of model ("CJS", "Burnham" etc)

parameters

list of model parameter specifications

nocc

number of occasions (value only specified if needed)

check

if TRUE only the vector of parameter names is returned par.list

number.of.groups

number of groups defined for data

Author

Jeff Laake

See Also

setup.model,valid.parameters