Learn R Programming

BayesfMRI (version 0.3.11)

organize_data: Organize data for Bayesian GLM

Description

Transforms the usual TxV BOLD data matrix Y into vector form, and the usual TxK design matrix X into big sparse matrix form for use in Bayesian GLM.

Usage

organize_data(y, X)

Value

A list containing fields y and A (see Details)

Arguments

y

the TxV data matrix containing the fMRI timeseries

X

the TxK design matrix with K task-related columns

Details

The Bayesian GLM requires y (a vector of length TV containing the BOLD data) and X_k (a sparse TVxV matrix corresponding to the kth task regressor) for each task k. The design matrices are combined as A=cbind(X_1,...,X_K).

The Bayesian GLM requires y (a vector of length TV containing the BOLD data) and X_k (a sparse TVxV matrix corresponding to the kth task regressor) for each task k. The design matrices are combined as A=cbind(X_1,...,X_K).