make_mask {BayesfMRI}R Documentation

Mask out invalid data

Description

Mask out data locations that are invalid (missing data, low mean, or low variance) for any session.

Usage

make_mask(data, meanTol = 1e-06, varTol = 1e-06, verbose = TRUE)

Arguments

data

A list of sessions, where each session is a list with elements BOLD, design, and optionally nuisance. See ?is.BfMRI.sess for details.

meanTol, varTol

Tolerance for mean and variance of each data location. Locations which do not meet these thresholds are masked out of the analysis. Defaults: 1e-6.

verbose

Print messages counting how many locations are removed? Default: TRUE.

Value

A logical vector indicating locations that are valid across all sessions.

Examples

nT <- 30
nV <- 400
BOLD1 <- matrix(rnorm(nT*nV), nrow=nT)
BOLD1[,seq(30,50)] <- NA
BOLD2 <- matrix(rnorm(nT*nV), nrow=nT)
BOLD2[,65] <- BOLD2[,65] / 1e10
data <- list(sess1=list(BOLD=BOLD1, design=NULL), sess2=list(BOLD=BOLD2, design=NULL))
make_mask(data)


[Package BayesfMRI version 0.3.11 Index]