bold2betasCCA: Convert a bold time series and design matrix to event-wise...

Description Usage Arguments Value Author(s) Examples

Description

Uses cca and nuisance variables to estimate multivariate betas per event.

Usage

1
2
3
4
bold2betasCCA(boldmatrix, designmatrix, blockNumb, bl = 12, baseshift = 5,
  mask = NA, sparseness = c(0, 0), multievents = FALSE, polydegree = 10,
  bestvoxnum = 50, nvecs = 5, whichcols = NA, mycoption = 1, its = 10,
  onlyhrf = FALSE)

Arguments

boldmatrix

input raw bold data in time by space matrix

designmatrix

input design matrix - binary/impulse entries for event related design, blocks otherwise

blockNumb

numbers for the rows that should be treated together as runs

bl

basis length for hrf estimation

baseshift

number of time points to ignore post-event onset

polydegree

number of polynomial predictors

nvecs

number of cca predictors to explore e.g. 5

Value

returns a list with relevant output

Author(s)

Avants BB

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# get example image
fn<-paste(path.package("RKRNS"),"/extdata/111157_mocoref_masked.nii.gz",sep="") 
eximg<-antsImageRead(fn,3)
fn<-paste(path.package("RKRNS"),"/extdata/subaal.nii.gz",sep="") 
mask<-antsImageRead(fn,3)
bb<-simulateBOLD(option="henson",eximg=eximg,mask=mask)
mat<-timeseries2matrix( bb$simbold, bb$mask )
runs<-bb$desmat$Run; 
### cca betas
mysp<-c( -0.01, -0.9 )
btsc<-bold2betasCCA( data.matrix(mat)  , bb$desmat[,1:4], blockNumb=runs,
     bl=25, baseshift=0, sparseness=mysp, bestvoxnum=10, mask=mask, 
     polydegree=1, mycoption=1, its=12, onlyhrf=FALSE )
plot(ts(t(btsc$runhrfs)))
# from here see the help for bold2betas

stnava/RKRNS documentation built on May 30, 2019, 7:21 p.m.