is.BfMRI.sess {BayesfMRI} | R Documentation |
Validate a "BfMRI.sess"
object.
Description
Check if object is valid for a "BfMRI.sess"
object.
Usage
is.BfMRI.sess(x)
Arguments
x |
The putative |
Details
A "BfMRI.sess"
object is a list of length S
, where S
is
the number of sessions in the analysis. Each list entry corresponds to a
separate session, and should itself be a list with these named fields:
- BOLD
a
T \times V
BOLD matrix. Rows are time points; columns are data locations (vertices/voxels).- design
a
T \times K
matrix containing theK
task regressors. Seemake_HRFs
.- nuisance
an optional argument.
T \times J
matrix containing theL
nuisance regressors.
In addition, all sessions must have the same number of data locations, V
, and tasks, K
.
Value
Logical. Is x
a valid "BfMRI.sess"
object?
Examples
nT <- 180
nV <- 700
BOLD1 <- matrix(rnorm(nT*nV), nrow=nT)
BOLD2 <- matrix(rnorm(nT*nV), nrow=nT)
onsets1 <- list(taskA=cbind(c(2,17,23),4)) # one task, 3 four sec-long stimuli
onsets2 <- list(taskA=cbind(c(1,18,25),4))
TR <- .72 # .72 seconds per volume, or (1/.72) Hz
duration <- nT # session is 180 volumes long (180*.72 seconds long)
design1 <- make_HRFs(onsets1, TR, duration)$design
design2 <- make_HRFs(onsets2, TR, duration)$design
x <- list(
sessionOne = list(BOLD=BOLD1, design=design1),
sessionTwo = list(BOLD=BOLD2, design=design2)
)
stopifnot(is.BfMRI.sess(x))
[Package BayesfMRI version 0.3.11 Index]