Build contrasts query for SPM12 results

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)
#> $titlestr
#> [1] "'condition1'"
#> 
#> $contrasts
#> [1] "[1];"
#> 
#> $threshdesc
#> [1] "'FWE'"
#> 
#> $thresh
#> [1] 0.05
#> 
#> $extent
#> [1] 0
#> 
#> $mask
#> $mask$none
#> [1] 1
#> 
#> 
contrasts = list(
list(name = "All Contrasts",
       weights = Inf
       ),
list(name = "RightHand",
weights = 2) 
)
res = spm12_contrast_query_list(contrasts)
print(res)
#> $`(1)`
#> $`(1)`$titlestr
#> [1] "'All Contrasts'"
#> 
#> $`(1)`$contrasts
#> [1] Inf
#> 
#> $`(1)`$threshdesc
#> [1] "'FWE'"
#> 
#> $`(1)`$thresh
#> [1] 0.05
#> 
#> $`(1)`$extent
#> [1] 0
#> 
#> $`(1)`$mask
#> $`(1)`$mask$none
#> [1] 1
#> 
#> 
#> 
#> $`(2)`
#> $`(2)`$titlestr
#> [1] "'RightHand'"
#> 
#> $`(2)`$contrasts
#> [1] "[2];"
#> 
#> $`(2)`$threshdesc
#> [1] "'FWE'"
#> 
#> $`(2)`$thresh
#> [1] 0.05
#> 
#> $`(2)`$extent
#> [1] 0
#> 
#> $`(2)`$mask
#> $`(2)`$mask$none
#> [1] 1
#> 
#> 
#>