S3 Print Methods:
print.imugap_fit() providing a structured summary of the location
hierarchy, observation data distribution, and key Stan parameters (beta_bs,
sigma_layer, lambda_raw, and lp__).print.imugap_predict() displaying target coverage metadata, location counts,
and posterior prediction draw dimensions.Vignette Architecture & Documentation Overhaul:
imuGAP (core workflow),
example_data (input data schemas and structure), examining_fits (posterior
diagnostics and inspection), and user_specified_layers (multi-layer and single-layer
spatial partitions).Automated Diagram Pipeline:
just diagrams) generating SVG
and PDF visual assets with dark-mode compatibility.Structured Input Conditions (#156):
stop_fmt_if() have class imugap_error; warnings from
warn_fmt_if() have class imugap_warning. Both retain their base condition classes
and carry a template id and raw values in fields. Front-ends can read these fields
instead of parsing message text. Stan backend errors retain their own classes.rows field (1-based indices
into the table the caller passed), and name the caller's table (observations,
populations) instead of the internal dt.canonicalize_locations() now rejects NA in loc_id, and canonicalize_observations()
accepts an all-NA logical censored column (as read.csv() gives) as none censored.
An NA in a subset-checked column is reported as a missing value, not as "missing NA".make_init_fn().just recipes (just lint,
just docs, just diagrams, just data-fit).lintr package execution from devtools in CI linting workflows.Arbitrary Hierarchy Layer Depth:
sampling(), canonicalize_locations(), and underlying Stan models now support user-defined hierarchical location structures of arbitrary depth (e.g. 1-layer statewide, 2-layer state-county, 3-layer state-county-school, or deeper regional partitions).assemble_layer_data() helper to construct and validate hierarchical metadata, bounds, and parent mappings.impute_school_coverage_process_v6_single_layer with automatic dispatch when single-layer inputs are supplied.user_specified_layers) demonstrating 1-layer, 2-layer, and 3-layer model estimation and prediction workflows.Backend Abstraction via flexstanr:
flexstanr (>= 0.2.0) to provide uniform backend abstraction across rstan and cmdstanr MCMC engines.flexstanr::stan_options() for seamless sampler configuration.Modular Stan Architecture:
#include directives (functions/, data/, transformed_data/, parameters/, model/).Data Pipeline & Target Generation:
create_target() and validation function canonicalize_target().fit_sim_1layer, fit_sim_2layer, predict_sim_1layer, predict_sim_2layer, target_sim_1layer, target_sim_2layer).ERR_* format string constants and helper assertion functions stop_fmt_if() and warn_fmt_if().NA weights in population and target specifications.@examplesIf interactive() and \donttest{} idiom to computationally heavy examples, enabling fast pkgdown builds (~35 seconds) while remaining CRAN --as-cran compliant.First public release. Initial feature set:
sampling(): fits the imuGAP Bayesian hierarchical coverage model via
rstan::sampling() and returns an imugap_fit object wrapping the
underlying stanfit together with model settings and dataset metadata.predict.imugap_fit(): posterior-predicts coverage probabilities for a
user-supplied target population grid using rstan::gqs().extract_imugap(): convenience wrapper around rstan::extract() for
pulling out common imuGAP parameters (defaults to the state-level
B-spline coefficients beta_bs).canonicalize_locations(), canonicalize_observations(),
canonicalize_populations(): validate and convert user-supplied data
into the canonical forms required by the sampler.imugap_options(): configures model-side settings (B-spline degrees of
freedom, dose schedule, model object).stan_options(): configures Stan sampler settings (iter, chains,
seed, etc.) with input validation.impute_school_coverage_process_v6 (adds county- and school-level
random effects; current default).locations_sim, observations_sim, populations_sim,
latent_params_sim, predict_sim, target_sim, and the reference
fit_sim stanfit fixture.