Build an AFNI-style restricted AR plan from root parameters
Source:R/afni_restricted.R
afni_restricted_plan.RdBuild an AFNI-style restricted AR plan from root parameters
Usage
afni_restricted_plan(
resid,
runs = NULL,
parcels = NULL,
p = 3L,
roots,
estimate_ma1 = TRUE,
exact_first = TRUE
)Arguments
- resid
(n x v) residual matrix (used only if estimate_ma1=TRUE)
- runs
integer vector length n (optional)
- parcels
integer vector length v (optional; if provided, plan pooling='parcel')
- p
either 3 or 5
- roots
either a single list with elements named as needed - for p=3: list(a, r1, t1, vrt = 1.0) - for p=5: list(a, r1, t1, r2, t2, vrt = 1.0) or a named list of such lists keyed by parcel id (character) for per-parcel specs. As in AFNI,
a,r1,r2must be non-negative (values above 0.95 are clamped to 0.95) and angles are clamped to[0, pi].vrtis AFNI's signal-to-total variance ratios^2 / (s^2 + w^2)for additive white noisew; it is used whenestimate_ma1 = FALSE.- estimate_ma1
logical. If
TRUE, estimate an MA(1) term from the AR-filtered voxels to stand in for AFNI's additive white noise (vrtis then ignored). IfFALSE, the white-noise share is taken fromvrt: forvrt < 1the plan is the exact ARMA(p, p) equivalent of AR(p) plus white noise, so its autocorrelation isvrttimes the AR autocorrelation at every non-zero lag;vrt = 1(default) gives the pure AR(p).- exact_first
apply exact AR(1) scaling at segment starts (harmless here; default TRUE)
Value
An fmriAR_plan with method = "afni" that can be supplied to
whiten_apply().