Learn R Programming

RMark (version 3.0.0)

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) defined in the call to make.mark.model

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

Details

The primary difference in setting up models for MARK is the number and types of parameters that are included in the model. This function sets up the list of parameters used in the model and defines values for each parameter that affect how the PIM and design data are structured in the input file for program MARK. Some of the values of the parameter list are user specified such as formula, link,fixed so this function only adds to the list of values that are not specified by the user. That is, it takes the input argument parameters and adds list elements for parameters not specified by the user and adds default values for each type of parameter and then returns the modified list. The structure of the argument parameters and the return value of this function are the same as the structure of the argument parameters in make.mark.model and argument model.parameters in mark. They are lists with an element for each type of parameter in the model and the name of each list element is the parameter name (e.g., "p", "Phi","S", etc). For each parameter there are a list of values (e.g., formula, link, num etc as defined below). Thus parameters is a list of lists.

See Also

setup.model,valid.parameters