simSetup: Sets up a Neuroimaging bootstrap-based simulation given a set...

Description Usage Arguments Value

View source: R/master.R

Description

The images can be images from a real data set. The bootstrap-based simulation conditions on the distribution of the sample by drawing subsets with replacement from the sample.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
simSetup(
  images,
  data,
  outdir,
  nsim = 1000,
  ns = c(50, 100, 200, 400),
  mask = NULL,
  rs = 8,
  betas = rep(0, length(rs)),
  ncores = parallel::detectCores()
)

Arguments

images

String vector containing paths to the images used for the simulation.

data

A dataframe with number of rows equal to the length of the images variable with corresponding covariates.

outdir

A directory to save the output files that are used for the simulations.

nsim

Number of simulations to setup for each sample size.

ns

Sample sizes to evaluate for each simulation. Should be less than the number of images.

mask

If performing simulations under an alternative, signal can be added to the images within the mask.

rs

vector of radii for signal spheres.

betas

vector of parameters for signal spheres. Signal is constant throughout the sphere.

ncores

number of cores for parallel commands.

Value

Returns a data frame of directories where simulation setup files are stored. The rds file in each directory saves the data frame and the image locations in the variable "images".


simonvandekar/NIsim documentation built on Oct. 12, 2020, 5:06 p.m.