This function bootstrap samples an AFQ dataframe by participant.
That is, it first pivots to wide format with one row per participant,
bootstrap samples, and finally pivots back to long format.
Usage
bootstrap_df(
input_df,
dwi_metric,
group_by = "group",
participant_id = "subjectID"
)
Arguments
- input_df
The input AFQ dataframe
- dwi_metric
The diffusion MRI metric (e.g. "FA", "MD")
- group_by
The grouping variable used to group nodeID smoothing terms
- participant_id
The name of the column that encodes participant ID
Value
A shuffled AFQ dataframe
Examples
if (FALSE) { # \dontrun{
df_afq <- read.csv("/path/to/afq/output.csv")
df_boot <- bootstrap_df(df_afq, "dti_fa")
} # }