SPM12 fMRI First Level Specification

build_spm12_first_level_spec(
  scans = NULL,
  outdir = NULL,
  units = c("scans", "secs"),
  slice_timed = TRUE,
  nslices = NULL,
  ref_slice = NULL,
  tr,
  condition_mat = NULL,
  condition_list = NULL,
  regressor_mat = NULL,
  regressor_list = NULL,
  hpf = 128,
  time_deriv = FALSE,
  disp_deriv = FALSE,
  interactions = FALSE,
  global_norm = c("None", "Scaling"),
  mthresh = 0.8,
  mask = NULL,
  correlation = c("AR(1)", "none", "FAST"),
  n_time_points = NULL,
  verbose = TRUE,
  overwrite = TRUE,
  ...
)

spm12_first_level_spec(
  ...,
  outdir = NULL,
  add_spm_dir = TRUE,
  spmdir = spm_dir(verbose = verbose, install_dir = install_dir),
  clean = TRUE,
  verbose = TRUE,
  overwrite = TRUE,
  install_dir = NULL
)

Arguments

scans

images to run

outdir

output directory for results

units

The onsets of events or blocks can be specified in either scans or seconds.

slice_timed

Were the image slice-time corrected

nslices

If the data were slice-time corrected, the number of slices of the image

ref_slice

If the data were slice-time corrected, the reference slice

tr

The repetition time, in seconds

condition_mat

multiple condition mat/txt file

condition_list

List of conditions: see spm12_condition. This should be a list (or a list of lists) which have the items: name, onset, duration, time_mod_order, param_mod, orth. name does not need to be specified if it is a named list of lists.

regressor_mat

multiple regressor mat/txt file

regressor_list

List of regressors: see spm12_regressor. This should be a list (or a list of lists) which have the items: name, value, and n_time_points. name does not need to be specified if it is a named list of lists.

hpf

High pass filter, in seconds.

time_deriv

time derivative. The time derivative allows the peak response to vary by plus or minus a second.

disp_deriv

dispersion derivative, allows the width of the response to vary.

interactions

Model interactions, Generalized convolution of inputs with basis set.

global_norm

Global intensity normalisation

mthresh

Masking threshold, defined as proportion of globals.

mask

Specify an image for explicitly masking the analysis.

correlation

Serial correlations in fMRI time series

n_time_points

Number of time points

verbose

Print diagnostic messages

overwrite

If a SPM.mat file exists in the outdir, should the file be removed?

...

Arguments passed to run_spm12_script

add_spm_dir

Add SPM12 directory from this package

spmdir

SPM dir to add, will use package default directory

clean

Remove scripts from temporary directory after running

install_dir

directory to download SPM12

Value

A list of objects, including an spm object and output files.