Skip to contents

Performs OLS regression given a 4D neuroimage file and stimulus timings

Usage

ni_afni_deconvolve(
  STATmask = NULL,
  TR_1D = NULL,
  allzero_OK = NULL,
  args = NULL,
  automask = NULL,
  cbucket = NULL,
  censor = NULL,
  dmbase = NULL,
  dname = NULL,
  force_TR = NULL,
  fout = NULL,
  global_times = NULL,
  glt_label = NULL,
  gltsym = NULL,
  goforit = NULL,
  in_files = NULL,
  input1D = NULL,
  legendre = NULL,
  local_times = NULL,
  mask = NULL,
  noblock = NULL,
  nocond = NULL,
  nodmbase = NULL,
  nofdr = NULL,
  nolegendre = NULL,
  nosvd = NULL,
  num_glt = NULL,
  num_stimts = NULL,
  num_threads = NULL,
  ortvec = NULL,
  out_file = NULL,
  polort = NULL,
  rmsmin = NULL,
  rout = NULL,
  sat = NULL,
  singvals = NULL,
  stim_label = NULL,
  stim_times = NULL,
  stim_times_subtract = NULL,
  svd = NULL,
  tout = NULL,
  trans = NULL,
  vout = NULL,
  x1D = NULL,
  x1D_stop = NULL,
  .cwd = NULL,
  .env = NULL,
  .engine = NULL,
  .profile = NULL,
  dry_run = FALSE,
  echo = interactive()
)

Arguments

STATmask

Character; file path. build a mask from provided file, and use this mask for the purpose of reporting truncation-to float issues AND for computing the FDR curves. The actual results ARE not masked with this option (only with 'mask' or 'automask' options).

TR_1D

Numeric. TR to use with 'input1D'. This option has no effect if you do not also use 'input1D'.

allzero_OK

Logical. don't consider all zero matrix columns to be the type of error that 'gotforit' is needed to ignore.

args

Character. Additional parameters to the command

automask

Logical. build a mask automatically from input data (will be slow for long time series datasets)

cbucket

Character. Name for dataset in which to save the regression coefficients (no statistics). This dataset will be used in a -xrestore run [not yet implemented] instead of the bucket dataset, if possible.

censor

Character; file path. filename of censor .1D time series. This is a file of 1s and 0s, indicating which time points are to be included (1) and which are to be excluded (0).

dmbase

Logical. de-mean baseline time series (default if 'polort' >= 0)

dname

Character or numeric vector. set environmental variable to provided value

force_TR

Numeric. use this value instead of the TR in the 'input' dataset. (It's better to fix the input using Refit.)

fout

Logical. output F-statistic for each stimulus

global_times

Logical. use global timing for stimulus timing files

glt_label

Character or numeric vector. general linear test (i.e., contrast) labels

gltsym

Character or numeric vector. general linear tests (i.e., contrasts) using symbolic conventions (e.g., '+Label1 -Label2')

goforit

Integer. use this to proceed even if the matrix has bad problems (e.g., duplicate columns, large condition number, etc.).

in_files

Character or numeric vector. filenames of 3D+time input datasets. More than one filename can be given and the datasets will be auto-catenated in time. You can input a 1D time series file here, but the time axis should run along the ROW direction, not the COLUMN direction as in the 'input1D' option.

input1D

Character; file path. filename of single (fMRI) .1D time series where time runs down the column.

legendre

Logical. use Legendre polynomials for null hypothesis (baseline model)

local_times

Logical. use local timing for stimulus timing files

mask

Character; file path. filename of 3D mask dataset; only data time series from within the mask will be analyzed; results for voxels outside the mask will be set to zero.

noblock

Logical. normally, if you input multiple datasets with 'input', then the separate datasets are taken to be separate image runs that get separate baseline models. Use this options if you want to have the program consider these to be all one big run.* If any of the input dataset has only 1 sub-brick, then this option is automatically invoked!* If the auto-catenation feature isn't used, then this option has no effect, no how, no way.

nocond

Logical. DON'T calculate matrix condition number

nodmbase

Logical. don't de-mean baseline time series

nofdr

Logical. Don't compute the statistic-vs-FDR curves for the bucket dataset.

nolegendre

Logical. use power polynomials for null hypotheses. Don't do this unless you are crazy!

nosvd

Logical. use Gaussian elimination instead of SVD

num_glt

Integer. number of general linear tests (i.e., contrasts)

num_stimts

Integer. number of stimulus timing files

num_threads

Integer. run the program with provided number of sub-processes

ortvec

Character or numeric vector. this option lets you input a rectangular array of 1 or more baseline vectors from a file. This method is a fast way to include a lot of baseline regressors in one step.

out_file

Character; file path. output statistics file

polort

Integer. degree of polynomial corresponding to the null hypothesis [default: 1]

rmsmin

Numeric. minimum rms error to reject reduced model (default = 0; don't use this option normally!)

rout

Logical. output the R^2 statistic for each stimulus

sat

Logical. check the dataset time series for initial saturation transients, which should normally have been excised before data analysis.

singvals

Logical. print out the matrix singular values

stim_label

Character or numeric vector. label for kth input stimulus (e.g., Label1)

stim_times

Character or numeric vector. generate a response model from a set of stimulus times given in file.

stim_times_subtract

Numeric. this option means to subtract specified seconds from each time encountered in any 'stim_times' option. The purpose of this option is to make it simple to adjust timing files for the removal of images from the start of each imaging run.

svd

Logical. use SVD instead of Gaussian elimination (default)

tout

Logical. output the T-statistic for each stimulus

trans

Logical. check the dataset time series for initial saturation transients, which should normally have been excised before data analysis.

vout

Logical. output the sample variance (MSE) for each stimulus

x1D

Character; file path. specify name for saved X matrix

x1D_stop

Logical. stop running after writing .xmat.1D file

.cwd

Working directory override.

.env

Named character vector of environment variables.

.engine

Execution engine override.

.profile

Runtime profile override.

dry_run

Logical; preview command without executing.

echo

Logical; echo stdout/stderr in real time.

Value

An ni_result object.