spm12_contrast_query: Build contrasts query for SPM12 results

View source: R/spm12_contrast_query.R

spm12_contrast_queryR Documentation

Build contrasts query for SPM12 results

Description

Build contrasts query for SPM12 results

Usage

spm12_contrast_query(
  weights = Inf,
  name = "",
  threshold_type = c("FWE", "none", "FDR"),
  threshold = 0.05,
  number_extent_voxels = 0,
  mask_type = c("None", "Contrast", "Image"),
  mask_image = NULL,
  mask_contrast = NULL,
  mask_threshold = 0.05,
  mask_inclusive = TRUE
)

spm12_contrast_query_list(cons)

Arguments

weights

Weights of the contrast, must be the same length as the number of regressors

name

Name of the contrast

threshold_type

type of thresholding done, if any

threshold

Threshold value

number_extent_voxels

Number of voxel extent to call an area a cluster

mask_type

type of mask, if any

mask_image

If mask_type = "Image", then the filename of the mask

mask_contrast

Vector of weights for the contrast that will be used as the mask if mask_type = "Contrast"

mask_threshold

if mask_type = "Contrast", the threshold for the mask

mask_inclusive

Is the mask inclusive? If FALSE, then values in the mask which are zero will be included in the output

cons

List of contrasts

Value

A list of objects, each with a titlestr (title string), contrast, threshold description, threshold value, extent of voxels, and a mask (if appropriate)

Examples

res = spm12_contrast_query(name = "condition1", weights = 1)
print(res)
contrasts = list(
list(name = "All Contrasts",
       weights = Inf
       ),
list(name = "RightHand",
weights = 2) 
)
res = spm12_contrast_query_list(contrasts)
print(res)

muschellij2/spm12r documentation built on Aug. 31, 2022, 9:49 p.m.