simbrain {mand}R Documentation

Generate simulation data Function

Description

This is a function for simulation data based on the real base brain image data and difference in brain between healty and disease groups.

Usage

simbrain(
  baseimg,
  diffimg,
  sdevimg = NULL,
  mask = NULL,
  n0 = 10,
  c1 = 0.5,
  sd1 = 0.01,
  rho = NULL,
  zeromask = FALSE,
  reduce = c("no", "rd1", "rd2")[1],
  output = c("rdata", "nifti")[1],
  seed = 1
)

Arguments

baseimg

an array for the basis image.

diffimg

an array for the difference image.

sdevimg

an array for the standard deviation image.

mask

an array for the mask image.

n0

a numeric, which is a sample size per group.

c1

a numeric, the strength of the difference

sd1

a numeric, standard deviation for the individual variation.

rho

a numeric, correlation coefficient in the noize

zeromask

a logical, whether mask the position with zero values for all subjects.

reduce

a vector.

output

a vector.

seed

a numeric for seed for random variables.

Details

simbrain requires a base brain image data and mean difference image data.

Value

S

data matrix

Z

binary group variable

brainpos

binary brain position.

imagedim

three dimensional vector for image dimension

Examples

data(baseimg)
data(diffimg)
sim1 = simbrain(baseimg = baseimg, diffimg = diffimg)


[Package mand version 2.0 Index]