Fit a hierarchical model taking account of possible sparsity
fit_hier_model.RdFits 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.
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:
abundanceEstimated total population size, or
NAif the model has no valid fit.bic,aicBIC and AIC values, where available.
neginfparsEncoded parameters represented at minus infinity on the extended-model boundary.
maskedparsEncoded 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 .