Stable entry points to help upstream packages reuse fmriAR whitening without rewriting existing pipelines.
Value
A list environment containing compatibility functions:
plan_from_phi: Create whitening plan from AR coefficientswhiten_with_phi: Apply whitening given AR coefficientsupdate_plan: Update existing plan with new residualsplan_info: Extract information from a plan objectwhiteness_score: Compute whiteness metric from residualsafni_restricted_plan: Build AFNI-style restricted AR plan from root parameters (advanced; internal helper exposed via compat)
Examples
# Create compatibility interface
compat_funcs <- compat
# Example: Create whitening plan from AR coefficients
phi <- c(0.3, 0.1) # AR(2) coefficients
plan <- compat_funcs$plan_from_phi(phi, exact_first = TRUE)
# Example: Compute whiteness score
resid <- matrix(rnorm(100 * 10), 100, 10)
score <- compat_funcs$whiteness_score(resid)