Sim.3D.GammaRF: Simulate Gamma distributed Random Field

Description Usage Arguments Value Author(s) Examples

View source: R/threshold.R

Description

Simulates a Gamma distributed random field by simulating a Gaussian Random Field and transforming it to be Gamma distributed.

Usage

1
Sim.3D.GammaRF(d, voxdim, sigma, ksize, mask, shape, rate)

Arguments

d

A vector specifying the dimensions of a 3D or 4D array.

voxdim

The dimensions of each voxel.

sigma

The 3D covariance matrix of the field.

ksize

The size (in voxels) of the kernel with which to filter the independent field.

mask

A 3D mask for the field.

shape

The shape parameter of the Gamma distribution.

rate

The rate parameter of the Gamma distribution.

Value

A 3D array containing the simulated field

Author(s)

J. L. Marchini

Examples

1
2
3
4
5
6
7
8
d <- c(64, 64, 21)
FWHM <- 9
sigma <- diag(FWHM^2, 3) / (8 * log(2))
voxdim <- c(2, 2, 4)
m <- array(1, dim = d)

a <- Sim.3D.GammaRF(d = d, voxdim = voxdim, sigma = sigma, 
                    ksize = 9, mask = m, shape = 6, rate = 1)

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