sparse_and_PW: Organize data for Bayesian GLM

View source: R/sparse_and_PW.R

sparse_and_PWR Documentation

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

sparse_and_PW(
  BOLD,
  design,
  spatial,
  spde,
  field_names,
  design_type,
  valid_cols,
  nT,
  sqrtInv_all
)

Arguments

BOLD, design, spatial, spde

See fit_bayesglm.

field_names, design_type

See fit_bayesglm.

valid_cols, nT, sqrtInv_all

See fit_bayesglm.

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 field regressor) for each field 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 field regressor) for each field k. The design matrices are combined as A=cbind(X_1,...,X_K).

Value

A list containing fields y and A (see Details)


BayesfMRI documentation built on April 4, 2025, 1:58 a.m.