Loads subject PEBs (.rds or .mat), builds the third-level
design, runs the PEB-of-PEBs, and returns a tidy summary. Optionally saves
the group PEB.
dcm_peb_of_pebs(
peb_dir,
subjects = NULL,
covariates = NULL,
Xnames = NULL,
save_path = NULL,
M = list(Q = "single", alpha = 1, beta = 16, maxit = 64),
field = "all",
verbose = TRUE
)Directory containing the subject PEB files.
Optional integer vector; restrict to these subject numbers.
Optional data frame of between-subject covariates, one row
per subject in the order returned by dcm_peb_files.
NULL gives an intercept-only design (the group mean).
Optional custom design column names.
Optional path to save the group PEB to, as .rds.
NULL (the default) does not write anything to disk.
Third-level model options passed to dcm_peb_prepare.
Parameter blocks to model; "all" is typical for PEB
inputs.
Logical. Report progress via message().
List with group_PEB, save_path (NULL if not
saved), subjects, X (the design), and summary (a tidy
data frame of parameter estimates).
Nothing is written to disk unless save_path is supplied.