Skip to contents

Fits the hierarchical models permitted by the specified number of lists and maximum interaction order, and orders the valid fits by increasing BIC.

Usage

assemble_bic(
  xdata,
  maxorder = dim(xdata)[2] - 2,
  checkexist = TRUE,
  removeFRfail = TRUE,
  maxmodel = 100000L,
  ...
)

Arguments

xdata

Capture history data in the standard package format.

maxorder

Maximum interaction order to be included.

checkexist

If TRUE, check parameter identifiability and existence of the extended MLE for each model.

removeFRfail

If TRUE, remove models without a valid fit from the results.

maxmodel

Maximum number of models stored during enumeration.

...

Additional arguments passed to fit_hier_model().

Value

A list with components:

res

A matrix containing the population estimate, BIC and maximum interaction order for each retained model, ordered by increasing BIC. Model strings are used as row names.

xdata

The original capture history data.

maxorder

The largest interaction order among the retained models, or 0 if no model is retained.

models

Named encoded models in result-row order.

requested_maxorder, enumeration_maxorder

Requested and actual enumeration orders, before failed fits are removed.

best_neginfpars

Encoded effects represented at minus infinity in the model with the smallest BIC, or an empty vector if there is no valid model or no such effect.