sim.fmri: Simulate FMRI Data

Description Usage Arguments Details Note Author(s) Examples

Description

This function returns the synthetic spatiotemporal data set resembling functional MR Images (fMRI) data.

Usage

1
  sim.fmri(hrf, beta)

Arguments

hrf

haemodynamic response function, needs to be a vector of length T.

beta

scalar, defines the height of the activated area, in form of a cylinder.

Details

The returned data is simulated on a 20 x 20 grid.

Note

This function is solely for one covariate.

Author(s)

Max Hughes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# non-transformed hr-function
T <- 210
seq.length <- T*3
index <- seq(3, T*3, by = 3)
hrf <- rep(c(-0.5, 0.5), each=30, times=ceiling(T/30*1.5))
hrf <- as.matrix(hrf[index])
# define height of activation area
beta <- 3
# use function to obtain fmri data
data <- sim.fmri(hrf, beta)$fmri

Example output

Loading required package: Matrix
Loading required package: coda
Loading required package: mvtnorm
Loading required package: MCMCpack
Loading required package: MASS
##
## Markov Chain Monte Carlo Package (MCMCpack)
## Copyright (C) 2003-2019 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0350646 and SES-0350613)
##
Loading required package: spatstat
Loading required package: spatstat.data
Loading required package: nlme
Loading required package: rpart

spatstat 1.59-0       (nickname: 'J'ai omis les oeufs de caille') 
For an introduction to spatstat, type 'beginner' 


Note: R version 3.4.4 (2018-03-15) is more than 9 months old; we strongly recommend upgrading to the latest version

Attaching package: 'spatstat'

The following object is masked from 'package:MASS':

    area

Loading required package: parallel

adaptsmoFMRI documentation built on May 1, 2019, 9:19 p.m.