MyNixOS website logo
Description

Statistical Analysis for Task-Based Fmri Data.

The 'BayesDLMfMRI' package performs statistical analysis for task-based functional magnetic resonance imaging (fMRI) data at both individual and group levels. The analysis to detect brain activation at the individual level is based on modeling the fMRI signal using Matrix-Variate Dynamic Linear Models (MDLM). The analysis for the group stage is based on posterior distributions of the state parameter obtained from the modeling at the individual level. In this way, this package offers several R functions with different algorithms to perform inference on the state parameter to assess brain activation for both individual and group stages. Those functions allow for parallel computation when the analysis is performed for the entire brain as well as analysis at specific voxels when it is required. References: Cardona-Jiménez (2021) <doi:10.1016/j.csda.2021.107297>; Cardona-Jiménez (2021) <arXiv:2111.01318>.

BayesDLMfMRI a R package for Statistical Analysis for Task-Based Fmri Data

Installation

install.packages("remotes")
remotes::install_github("JohnatanLAB/BayesDLMfMRI")

Basic example

library(BayesDLMfMRI)
library(oro.nifti)
library(neurobase)


fMRI.data <- get_example_fMRI_data() 
data("covariates", package="BayesDLMfMRI")

res <- ffdEvidenceFETS(ffdc = fMRI.data,
                    covariates = Covariates,
                    m0 = 0, Cova = 100, delta = 0.95,
                    S0 = 1, n0 = 1, Nsimu1 = 100, Cutpos1 = 30,
                    r1 = 1, Test = "LTT", Ncores = 15)
                    
res.auxi <- res[[1]]
data("ffd", package="BayesDLMfMRI") # used for overlay.
Z.visual.c <- nifti(res.auxi, datatype=16)
ortho2(ffd, ifelse(Z.visual.c > 0.95, Z.visual.c, NA),
       col.y = heat.colors(50), ycolorbar = TRUE, ybreaks = seq(0.95, 1, by = 0.001))

Group example

library(BayesDLMfMRI)
library(oro.nifti)
library(neurobase)

DataGroups <- get_example_fMRI_data_group()


# load example covaraites and mask
data("covariates", package="BayesDLMfMRI")
data("mask", package="BayesDLMfMRI")

res <- ffdGroupEvidenceFFBS(ffdGroup = DataGroups, covariates = Covariates, 
                            m0=0, Cova=100, delta = 0.95, S0 = 1, n0 = 1, N1 = FALSE, Nsimu1 = 100, 
                            Cutpos = 30, r1 = 1, mask = mask, Ncores = 1)
                            
str(res)        

Metadata

Version

0.0.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows