Calculate Framewise Displacement (FD)
An \(N\) by \(6\) matrix in which the first three columns represent the
translational RPs (trans_units), and the second three columns represent
the rotational RPs (rot_units). If rot_units measures an angle,
it will be converted to trans_units by measuring displacement on a
sphere of radius brain_radius trans_units.
Alternatively, this can be the file path to an \(N\) by \(6\) matrix which can be
read with read.table (fields separated by white-space; no
header).
"mm" for millimeters (default), "cm"
for centimeters, or "in" for inches.
"deg" for degrees (default), "rad" for radians,
or one of the trans_units options.
If rot_units measures an angle, the rotational RPs
are transformed to a spatial measurement representing the displacement on a
sphere of radius brain_radius trans_units.
If brain_radius is NULL (default), it will be set to
50 mm.
Detrend each RP with the DCT before computing FD?
Default: FALSE. Can be a number of DCT bases to use, or TRUE
to use 4.
The difference of indices between which to calculate change in
position. Default: 1 (the previous timepoint). Changing this
argument sets \(\Delta x_i = x_{i-lag} - x_i\) (and similarly for the
other RPs).
FD values higher than this will be flagged. Default: .3.
A list with components
A length \(N\) vector of FD values in trans_units.
"FD"
cutoff
A length-N logical vector, where TRUE indicates suspected outlier presence.
The FD formula is taken from Power et. al. (2012):
$$FD_i = | \Delta x_i | + | \Delta y_i | + | \Delta z_i | + | \Delta \alpha_i | + | \Delta \beta_i | + | \Delta \gamma_i |$$
where \(i\) is the timepoint; \(x\), \(y\) and \(z\) are the translational realignment parameters (RPs); \(\alpha\), \(\beta\) and \(\gamma\) are the rotational RPs; and \(\Delta x_i = x_{i-1} - x_i\) (and similarly for the other RPs).
Power, J. D., Barnes, K. A., Snyder, A. Z., Schlaggar, B. L. & Petersen, S. E. Spurious but systematic correlations in functional connectivity MRI networks arise from subject motion. Neuroimage 59, 2142-2154 (2012).