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.
organize_data_pw(y, X, transpose = TRUE)A list containing fields y and A (see Details)
the TxV data matrix containing the fMRI timeseries
the TxK design matrix with K task-related columns
Check orientation of data, which, if TRUE, will transpose
the data when the number of time points is greater than the number of voxels.
Note: this is not always true for subcortical regions.
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).