v1.2026.3 improved sampling - #132
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved the sampling of all models by increasing the level of vectorization. These changes are all internal to the Stan models and are only visible to a user that is/has created a customized version of one of the models. In many cases, these improvements reduce the time required to run a model by 33%. Yay!
Added an argument to
prepare_model(predict_counts = TRUE)that allows the user to decrease the size of the stored model file (by ~10%) by removing the count-level predictions (ifpredict_counts = FALSE). Default is TRUE to include the predictions so that posterior and prior predictions still work by default.Added a scaling factor to the spatial models to ensure consistent interpretation of the priors for the spatial variance across any spatial graph. Following recommendations in Freni-Sterrantino et al. 2018. This is also largely an internal change, although the new realised variance term is accessible in the parameter summary as sdstrata_scaled and sdbeta_scaled.
Added some backend data to support better spatial overlay of the route locations and the strata maps. This is a partial patch in anticipation of the release of official route-path data from both national offices (expected within the 2026 calendar year and before the next annual data release). These changes are all internal and only relevant when
stratify( use_map = TRUE).