cov.est: Estimates the covariance between neighbouring voxels

Description Usage Arguments Value Author(s) Examples

View source: R/spatial.mixture.R

Description

Estimates the covariance between neighbouring voxels using a specified neighbourhood system.

Usage

1
cov.est(mat, mask, nmat)

Arguments

mat

3D array of voxel values.

mask

Array with sam dimension as mat that is 1/0 for voxels to be included/excluded.

nmat

Neighbourhood matrix.

Value

The estimated covariance

Author(s)

J. L. Marchini

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
ksize <- 9
d <- c(64, 64, 21)
FWHM <- 9
sigma <- diag(FWHM^2, 3) / (8 * log(2))
voxdim <- c(2, 2, 4)

filtermat <- GaussSmoothKernel(voxdim, ksize, sigma)

mask <- array(1, dim = d)
num.vox <- sum(mask)

mat <- Sim.3D.GRF(d = d, voxdim = voxdim, sigma = sigma,
                  ksize = ksize, mask = mask, type = "field")$mat

nmat <- expand.grid(-1:1, -1:1, -1:1)
nmat4 <- nmat[c(11, 13, 15, 17), ]

cov <- cov.est(mat, mask, nmat4)

AnalyzeFMRI documentation built on Oct. 5, 2021, 5:06 p.m.