Conversation
Implement Phase 1 of spatial covariate functionality allowing users to include location-specific features (e.g., distance from boundary, tissue regions, local density) in SHADE models. Changes: - Add covariates parameter to make_data() with validation - Add covariate_list and quadrature_list parameters to prepare_spatial_model_data() - Update metadata to track covariate column names and indices - Add comprehensive tests for covariate functionality - Include working example demonstrating covariate usage Covariates are appended to the design matrix after dispersion features and automatically receive hierarchical coefficients in the Stan model. All changes are backward compatible.
Implements flexible API for extracting Spatial Interaction Curves (SICs) at different hierarchical levels (image, patient, group) with credible bands: - Core functions: * compute_sic_posterior() - Returns rvar posteriors for custom analysis * add_simultaneous_bands() - Family-wise credible bands * add_pointwise_bands() - Pointwise credible bands - Convenience wrappers: * extract_group_sics() - Group-level extraction with bands * extract_patient_sics() - Patient-level extraction with bands * extract_image_sics() - Image-level extraction with bands - Refactored plot_spatial_interaction_curves() to use new API - Added comprehensive tests (49 tests) including coverage validation - Added detailed example demonstrating all features The API supports tidyverse-style pipelines using posterior::rvar for natural uncertainty quantification workflows.
- Add test-examples-vignettes.R with tests for: - covariate_example.R execution - sic_extraction_example.R execution - Introduction vignette rendering Bug fixes discovered during testing: - Fix plot_spatial_interaction_curves() undefined variable errors - Support CmdStanVB (variational inference) in SIC extraction - Add focal_type and n_basis_functions to preprocessing metadata - Fix SIC extraction to use stored focal_type instead of num_types - Add namespace-qualified tidyr/dplyr calls in examples Also removes vignette build artifacts that shouldn't be tracked.
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.
No description provided.