Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
23 stars 17 forks source link

addVolumesToHierarchy is too specific #308

Open bcdarwin opened 2 years ago

bcdarwin commented 2 years ago

It can only accumulate by sum rather than mean, volume-weighted mean, etc. (in which case it's ambiguous whether it should be renamed...).

bcdarwin commented 2 years ago

From the documentation:

Currently propagates volumes up the tree by summing. Future versions will add propagating through weighted means or other functions
bcdarwin commented 2 years ago

Maybe something like addObservationsToLeaves <- function (hdefs, obs_matrix, colname) { ...error checking and assigning observations into leaves as in addHierarchyToVolumes...} is sufficient, or addObservationsToHierarchy also accepting combining functions. We would then generalize hanatLm via optional colname = "volumes" argument.