Skip to contents

Fits INAD models across candidate orders and reports BIC-based selection.

Usage

bic_order_inad(
  y,
  max_order = 2,
  thinning = "binom",
  innovation = "pois",
  blocks = NULL,
  ...
)

Arguments

y

Integer matrix.

max_order

Maximum order (1 or 2).

thinning

Thinning operator.

innovation

Innovation distribution.

blocks

Optional block assignments.

...

Additional arguments.

Value

A list with class "bic_order_inad" containing:

fits

List of fitted INAD models by candidate order

bic

Named numeric vector of BIC values by order

best_order

Order with minimum BIC

table

Data frame with order, logLik, n_params, and BIC

settings

Input and derived settings used for selection

Examples

# \donttest{
set.seed(1)
y <- simulate_inad(
  n_subjects = 30,
  n_time = 5,
  order = 1,
  thinning = "binom",
  innovation = "pois",
  alpha = 0.3,
  theta = 2
)
ord <- bic_order_inad(y, max_order = 2, thinning = "binom", innovation = "pois", max_iter = 10)
ord$best_order
#> [1] 0
# }