Subject-level projection bootstrap in medoid space
Source:R/dkge-bootstrap.R
dkge_bootstrap_projected.RdResamples transported subject vectors (already aligned in the medoid parcellation) to quantify between-subject variability without recomputing the group basis.
Usage
dkge_bootstrap_projected(
values_medoid,
B = 1000L,
aggregate = c("mean", "median"),
weights = NULL,
seed = NULL,
voxel_operator = NULL,
return_samples = TRUE
)Arguments
- values_medoid
List of length `S` where each element is a numeric vector defined on the medoid parcellation (e.g. LOSO contrast values).
- B
Number of bootstrap replicates.
- aggregate
Aggregation function applied to the resampled subjects (`"mean"` or `"median"`).
- weights
Optional subject weights applied when computing the resampled mean. Only used when `aggregate = "mean"`.
- seed
Optional random seed for reproducibility.
- voxel_operator
Optional matrix that maps medoid vectors to voxel space (columns = voxels). When supplied, summaries in voxel space are also returned.
- return_samples
Logical; when `TRUE` the matrix of bootstrap samples is returned in the output bundle.