Collects mark
models contained in lx
of specified type
(if any) and returns models in a list with a table of model results if
table=TRUE
.
collect.models(
lx = NULL,
type = NULL,
table = TRUE,
adjust = TRUE,
external = FALSE
)
model.list: a list of mark
models and optionally a table of
model results.
if NULL, constructs vector of object names (ls()
) from
frame of calling function otherwise it uses specifed names in lx
either NULL (for all types) or a character vector model type (e.g.
type="CJS"
)
if TRUE, a table of model results is also included in the returned list
if TRUE, adjusts number of parameters (npar) to number of columns in design matrix which modifies AIC
if TRUE the mark objects are saved externally rather than in the resulting marklist; the filename for each object is kept in its place
Jeff Laake
If lx
is NULL a vector of object names in the parent frame is
constructed for lx
. Within lx
all mark
model objects
(i.e., class(x)[1]=="mark"
) are returned if type
is NULL. If
type
is specified and is valid, then the names of all mark
model objects of the specified type
(i.e., class(x) =
c("mark",type)
) in lx
are returned. If table=TRUE
a table of
model selection results is also included in the returned list.
This function was written to be able to easily collect a series of mark
models in a list without specifying the names of each model object. This is
useful in constructing a return value of a function that runs a series of
models for a particular analysis. For an example see dipper
.
merge.mark
,remove.mark
,
collect.model.names
,run.models
,model.table
,dipper
# see examples in dipper, edwards.eberhardt and example.data
Run the code above in your browser using DataLab