rob_stabilize: Stabilize the center and scale of a timeseries robustly

View source: R/rob_stabilize.R

rob_stabilizeR Documentation

Stabilize the center and scale of a timeseries robustly

Description

Stabilize the center and scale of a timeseries using robust regression of DCT bases on the first and second moments.

Usage

rob_stabilize(
  x,
  center = TRUE,
  scale = TRUE,
  lmrob_method = "MM",
  rescale = TRUE
)

Arguments

x

The timeseries to stabilize.

center, scale

Center and scale? Default: TRUE for both. If scaling but not centering, the data must already be centered; otherwise, the results will be invalid. Can also be the number of DCT bases to use for robust stabilization of center/scale; TRUE will use 4.

lmrob_method

The lmrob_method argument to robustbase::lmrob.

rescale

After stabilizing x, re-center and re-scale to the original mean and variance? Default: TRUE.

Value

the timeseries with its center and scale stabilized


fMRIscrub documentation built on Oct. 25, 2023, 9:07 a.m.