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).
setup.parameters(
model,
parameters = list(),
nocc = NULL,
check = FALSE,
number.of.groups = 1
)
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.
p1 | List of specifications for parameter 1 |
p2 | List of specifications for parameter 2 |
. | |
. | |
. | |
pk | List of specifications for parameter k |
The elements for each parameter list all include:
begin | 0 or 1; beginning time for the first |
parameter relative to first occasion | |
num | 0 or -1; number of parameters relative to |
number of occassions | |
type | type of PIM structure; either "Triang" or "Square" |
formula | formula for parameter
model (e.g., ~time ) |
link | link function for parameter
(e.g., "logit" ) |
and may include:
share | only valid for p in closed capture models; |
if TRUE p and c models shared | |
mix | only valid for closed capture heterogeneity |
models; if TRUE mixtures are used | |
rows | only valid for closed capture heterogeneity models |
fixed | fixed values specified by user and |
not used modified in this function |
type of model ("CJS", "Burnham" etc)
list of model parameter specifications
number of occasions (value only specified if needed)
if TRUE only the vector of parameter names is returned
par.list
number of groups defined for data
Jeff Laake
setup.model
,valid.parameters