simVOLfmri: Simulate 3D or 4D fMRI data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/simVOLfmri.R

Description

Simulates a 3D or 4D fMRI dataset for the specified design and with activation in the specified regions.

Usage

1
2
3
4
5
6
7
8
simVOLfmri(design = list(), image = list(), base=0, dim, nscan = NULL,
	TR = NULL, SNR=NULL, noise = c("none", "white", "temporal", 
	"spatial", "low-frequency", "physiological", "task-related", 
	"mixture"), type = c("gaussian", "rician"), 
	spat = c("corr", "gaussRF", "gammaRF"), weights, verbose = TRUE, 
	rho.temp = 0.2, rho.spat = 0.75, freq.low = 128, 
	freq.heart = 1.17, freq.resp = 0.2, FWHM = 4, gamma.shape = 6, 
	gamma.rate = 1, vee=1, template)

Arguments

design

List generated by simprepTemporal specifying the design. If not specified, noise images are generated.

image

List generated by simprepSpatial specifying the activated regions. If not specified, noise images are generated

base

Baseline of the data. Should be a single number or an array with the same dimensions as in dim.

dim

Dimensions of the image space.

nscan

Number of scans for noise images.

TR

Repetition time for noise images.

SNR

Signal-to-noise ratio.

noise

Type of noise, default is white.

type

If noise==white or noise==mixture, the type of system noise (default is gaussian).

spat

If noise==spatial or noise==mixture, the spatial correlation structure (default is corr).

weights

If noise==mixture, weights vector of six elements.

verbose

Logical indicating if warning should be printed.

rho.temp

If noise==temporal or noise==mixture, value of autocorrelation coefficients. The length of the vector indicates the order of the autoregressive model.

rho.spat

If noise==spatial or noise==mixture, and spat==corr, value of the correlation coefficient.

freq.low

If noise==low-frequency or noise==mixture, frequency of the low-frequency drift in seconds.

freq.heart

If noise==physiological or noise==mixture, frequency of heart rate in Hz.

freq.resp

If noise==physiological or noise==mixture, frequency of respiratory rate in Hz.

FWHM

If noise==spatial or noise==mixture, and spat==gaussRF or spat==gammaRF, value of the FWHM of the Gaussian kernel.

gamma.shape

If noise==spatial or noise==mixture, and spat==gammaRF, value of the shape parameter of the gamma distribution.

gamma.rate

If noise==spatial or noise==mixture, and spat==gammaRF, value of the rate parameter of the gamma distribution.

vee

If type==rician, non-centrality parameter of the rician distribution.

template

An array representing the anatomical structure or mask with dimensions equal to dim.

Value

A 3D or 4D array specifying the values for each voxel in the data.

Author(s)

M. Welvaert

See Also

simTSfmri, simprepTemporal, simprepSpatial

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
design <- simprepTemporal(totaltime=200, onsets=seq(1,200,40), 
	durations=20, TR=2, effectsize=1, hrf="double-gamma")
region <- simprepSpatial(regions=2, coord=list(c(32,15),c(57,45)), 
	radius=c(10,7), form="sphere", fading=TRUE)
out <- simVOLfmri(design=design, image=region, dim=c(64,64), 
	SNR=1, noise="none")
## Not run: plot(out[32,15,], type="l")
## Not run: library(lattice)
library(gplots)
levelplot(out[,,10],scales=list(tck=0), 
	col.regions=colorpanel(50,high="white",low="black"))
## End(Not run)

NeuroStat/neuRosim documentation built on Sept. 14, 2019, 10:37 a.m.