Regress governed short-separation nuisance signals
Source:R/short-separation.R
shortSeparationRegress.RdFits a centred short-channel regression separately for each long channel.
Short channels are copied unchanged. Positive lag means that the short
signal at t - lag_seconds predicts the long signal at t.
Arguments
- x
A governed OD or pair-collapsed haemoglobin
PhysioExperiment.- assay_name
Exact source assay name.
- short
A compatible
nirs_short_channelsmap returned byidentifyShortChannels(), orNULLto use the strict 10-mm default.- method
Exactly
"nearest"or"all".- lag_seconds
A finite lag that corresponds to an exact sample count.
- output_assay
Exact name for the added corrected assay.
- condition_limit
Finite regression condition-number limit greater than one.
Details
For a target y and selected short signals X, the fitted
intercept is retained and only (X - colMeans(X)) beta is subtracted.
Regression uses a deterministic SVD solve and rejects rank-deficient or
over-limit designs. Short columns and lag-edge rows remain unchanged.
Examples
od <- intensityToOD(PhysioNIRS:::.nirs_demo_object())
short <- identifyShortChannels(od, threshold_m = 0.015)
corrected <- shortSeparationRegress(od, short = short)
SummarizedExperiment::assayNames(corrected)
#> [1] "raw" "OD" "OD_ssr"