Skip to contents

Fits a Poisson log-linear model on the appropriate face of the parameter space. Parameters whose sufficient statistics are zero are fixed at minus infinity and their descendant cells are removed before fitting.

Usage

fit_hier_model(xdatin, hiermod, bicRcap = TRUE, checkid = FALSE)

Arguments

xdatin

Data prepared by ingest_data().

hiermod

Full encoded effect vector or hierarchy string.

bicRcap

If TRUE, use the number of observed cases as the BIC sample size. Otherwise use the number of fitted cells in the Poisson log-linear model.

checkid

If TRUE, check parameter identifiability and existence of the extended MLE before fitting.

Value

An object returned by stats::glm.fit(), augmented by:

abundance

Estimated total population size, or NA if the model has no valid fit.

bic, aic

BIC and AIC values, where available.

neginfpars

Encoded parameters represented at minus infinity on the extended-model boundary.

maskedpars

Encoded masked parameters assigned the conventional coefficient zero; their values are not identifiable.

References

Silverman, B. W., Chan, L. and Vincent, K., (2024). Bootstrapping Multiple Systems Estimates to Account for Model Selection. Statistics and Computing, 34, 44. doi:10.1007/s11222-023-10346-9 .