| bic_inad | R Documentation |
Computes BIC using the fitted log likelihood and a parameter count that respects structural zeros and identifiability constraints.
bic_inad(fit, n_subjects = NULL)
fit |
A fitted model object returned by |
n_subjects |
Number of subjects, typically |
The BIC is computed as:
BIC = -2 \times \ell + k \times \log(N)
where \ell is the log-likelihood, k is the number of free parameters,
and N is the number of subjects.
A numeric scalar BIC value.
set.seed(1)
y <- simulate_inad(
n_subjects = 40,
n_time = 5,
order = 1,
thinning = "binom",
innovation = "pois",
alpha = 0.3,
theta = 2
)
fit <- fit_inad(y, order = 1, thinning = "binom", innovation = "pois", max_iter = 20)
bic_inad(fit, n_subjects = nrow(y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.