Skip to contents

Stable entry points to help upstream packages reuse fmriAR whitening without rewriting existing pipelines.

Usage

compat

Format

An object of class list of length 6.

Value

A list environment containing compatibility functions:

  • plan_from_phi: Create whitening plan from AR coefficients

  • whiten_with_phi: Apply whitening given AR coefficients

  • update_plan: Update existing plan with new residuals

  • plan_info: Extract information from a plan object

  • whiteness_score: Compute whiteness metric from residuals

  • afni_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)