MEAsmooth | R Documentation |
This function applies a moving average filter, based on SAS "proc expand" procedure. The moving average is applied independently on each subject's motion energy data. NA values are set to 0.
MEAsmooth(mea, moving.average.win = 0.5)
mea |
an object of class |
moving.average.win |
numeric. The size of the filter window, in seconds or fractions of seconds. |
The filtered object(s)
## read the first 4 minutes of the normal sample ## (intake interviews of patients that carried on therapy) path_normal <- system.file("extdata/normal", package = "rMEA") mea_raw <- readMEA(path_normal, sampRate = 25, s1Col = 1, s2Col = 2, s1Name = "Patient", s2Name = "Therapist", idOrder = c("id","session"), idSep="_", skip=1, nrow = 6000) ## filter with moving average mea_filter = MEAsmooth(mea_raw) ## assign groups names mea_raw <- setGroup(mea_raw, "raw") mea_filter <- setGroup(mea_filter, "filtered") ## Compute ccf mea_raw <- MEAccf(mea_raw, lagSec = 5, winSec = 60, incSec = 30, r2Z = TRUE, ABS = FALSE) mea_filter <- MEAccf(mea_filter, lagSec = 5, winSec = 60, incSec = 30, r2Z = TRUE, ABS = FALSE) ## Compare the effect of filtering on ccf MEAlagplot(mea_filter, contrast = mea_raw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.