n_routes parameter in si_estim() - Users can now specify the number
of transmission routes to model (integer >= 2, default 4). Previously this
was fixed. The number of mixture components fitted is 2*n_routes - 1 for
the normal distribution and n_routes for the gamma distribution.
wind parameter in si_estim() - Adds a window censure interval
parameter (default 1) to si_estim(), giving users control over interval
censoring in the likelihood calculation.
compare_n_routes() function - New model-selection utility that fits
si_estim() for each value of n_routes from 2 up to n_routes_max and
reports AIC and BIC for each fit. Helps identify the optimal number of
transmission routes from the data.
Added quick start guide vignette (quick_start_guide.Rmd) providing an
introductory walkthrough of si_estim() and compare_n_routes().
Added window parameter vignette explaining the wind censoring
parameter and its effect on serial interval estimation.
plot_si_fit_result() which accepts
si_estim() output directly, handling weight aggregation automatically for
both normal and gamma distributionsweighted_var() (| changed to || for scalar
comparison)weighted_var() documentationweighted_var() for degenerate inputs (fewer than
2 values, zero weights)na.rm handling in weighted_var() to also filter NA weightscalculate_si_probability_matrix()size changed to linewidth in
plot_si_fit())ggplot_build() type check in tests for newer ggplot2 versionsmatch.arg() validation for dist parameter in
integrate_components_wrapper()f0,
flower, fupper, f_norm, f_gam, conv_tri_dist,
integrate_component, integrate_components_wrapper, wt_loglik,
weighted_var, calculate_si_probability_matrix, create_day_diff_matrix,
calculate_truncation_correction) are now marked as internal. They remain
accessible via mitey::: if needed.@param r documentation in conv_tri_dist()Author and Maintainer fields to DESCRIPTION for R 4.5.2
compatibility.Rbuildignore to exclude .DS_Store, .Rhistory, ..Rcheck, and
.claude directoriesMultiple restarts for EM algorithm - Added n_starts parameter to si_estim()
to run the EM algorithm from multiple starting points and select the best result
based on log-likelihood. This helps avoid local optima when initial values are
far from the true parameters (fixes #7)
Convergence diagnostics - Added tol parameter to si_estim() for early
stopping when parameters stabilize. Returns converged and iterations in output
Log-likelihood output - si_estim() now returns loglik for model comparison
CITATION file - Added proper citation information with Zenodo DOI and methodology paper reference
generate_synthetic_epidemic(),
plot_si_fit(), convergence diagnostics, and multiple restartsrt_estim() → wallinga_lipsitch())si_estim())rt_estim(), rt_estim_w_boot())