Skip to contents

Parcel analogue of estimate_ar_whitener() that uses the parcel mean or optional wm_parcels subset to estimate AR(p) via Yule–Walker.

Usage

estimate_ar_whitener_parcel(cnv_run, wm_parcels = NULL, p = 1L)

Arguments

cnv_run

A ClusteredNeuroVec run.

wm_parcels

Optional integer indices of WM parcels for more robust AR estimation.

p

Integer AR order (default 1). Use higher orders for data with stronger temporal autocorrelation.

Value

List with components:

Q

Inverse Cholesky factor (whitening matrix)

Sigma

Regularized AR covariance matrix

phi

AR coefficients of length p

Details

The time series is formed as the mean across parcels, optionally restricted to white-matter parcels if wm_parcels indices are provided. The series is standardized and AR(p) coefficients are estimated via stats::ar.yw. The implied Toeplitz covariance matrix is regularized to ensure positive definiteness. Returns the whitener Q = chol(Sigma)^{-1} for use in the row metric construction.

Examples

# \donttest{
# Estimate AR(1) whitener using WM parcels
arw <- estimate_ar_whitener_parcel(cnv_run, wm_parcels = c(1,2,3), p = 1)
#> Error: object 'cnv_run' not found
# }