simple_roi_analysis: Perform ROI population analysis between two groups.

Description Usage Arguments Value Author(s) Examples

Description

Student's t-test performed for each labeled region within a specified mask to determine difference between a control group and an experimental group.

Usage

1
2
roiResults <- simple_roi_analysis( dimensionality = 3, controlFileNames = c(),
  experimentalFileNames = c(), roiLabelsFileName = "" )

Arguments

dimensionality

Dimension of images.

imageFileNames

List of image files.

testType

A value of 'lm', 'student.t', or 'wilcox'. The latter two test types are assumed to be two-sampled parametric and non-parametric, respectively.

predictors

A simple vector or single column matrix or data frame specifying sample membership for student.t or wilcox testing. For the 'lm' option, a data frame must be specified whose column names match the specified formula.

formula

Used with the 'lm' option for more sophisticated modeling.

roiLabelsFileName

File name of mask defining the region over which testing is performed (foreground voxel != 0, background voxel = 0)

Value

list consisting of unique roi labels, t-values, and p-values.

Author(s)

Tustison NJ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
# Get the image files
controlFileNames <- list.files( path = "./example_images/", pattern =
  glob2rx( "phantomtemplate_CONTROL*" ), full.names = TRUE, recursive = FALSE )
experimentalFileNames <- list.files( path = "./example_images/", pattern =
  glob2rx( "phantomtemplate_EXP*" ), full.names = TRUE, recursive = FALSE )

images <- c( controlFileNames, experimentalFileNames )
diagnosis <- c( rep( 1, length( controlFileNames ) ), rep( 0, length( experimentalFileNames ) ) )
age <- runif( length( diagnosis ), 25, 30 )
outputPath <- "./test_output/"

roiResults.ttest <- simple_roi_analysis( dimensionality = 2, imageFileNames = images,
  predictors = data.frame( diagnosis ),
  roiLabelsFileName = "./example_images/phantomtemplate_roi_labels.nii.gz", testType = 'student.t' )

roiResults.wilcox <- simple_roi_analysis( dimensionality = 2, imageFileNames = images,
  predictors = data.frame( diagnosis ),
  roiLabelsFileName = "./example_images/phantomtemplate_roi_labels.nii.gz", testType = 'wilcox' )

roiResults.lm <- simple_roi_analysis( dimensionality = 2, imageFileNames = images,
  predictors = data.frame( cbind( diagnosis, age ) ), formula = as.formula( value ~ 1 + diagnosis + age ),
  roiLabelsFileName = "./example_images/phantomtemplate_roi_labels.nii.gz", testType = 'lm' )

## End(Not run)

stnava/itkImageR documentation built on May 30, 2019, 7:21 p.m.