fmri.detrend: Detrend fMRI time series

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/detrend.R

Description

Detrend fMRI dataset with a polynomial of given degree

Usage

1
fmri.detrend(data, degree = 1, accoef = 0)

Arguments

data

fMRI dataset of class ”fmridata

degree

Degree of the polynomial used to detrend the data. defaults to 1 (linear trends).

accoef

Coefficient of AR(1) model used for prewhitening. default 0.

Details

The function can be used to detrend the time series of an fMRI dataset data (of class ”fmridata” using polynomials. If the argument degree is larger than 0 (default: 1) the polynomial trends up to the given degree are removed from the data. If the argument accoef is larger than 0 (default: 0) prewhitening using an AR(1) model is performed.

Value

Detrended data object of class ”fmridata”.

Author(s)

Joerg Polzehl polzehl@wias-berlin.de

References

Polzehl, J. and Tabelow, K. (2007). fmri: A Package for Analyzing fmri Data, R News, 7:13-17.

See Also

fmri.lm

Examples

1
2
3
4
5
  # Example 1
  data <- list(ttt=writeBin(rnorm(32*32*32*107),raw(),4),
               mask=array(1,c(32,32,32)),dim=c(32,32,32,107))
  class(data) <- "fmridata"
  data <- fmri.detrend(data,2)

fmri documentation built on May 19, 2017, 1:34 p.m.

Search within the fmri package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.