spm12_condition: Build Conditions for SPM12 first level model

Description Usage Arguments Value Examples

View source: R/spm12_condition.R

Description

Build Conditions for SPM12 first level model

Usage

1
2
3
4
spm12_condition(name, onset, duration, time_mod_order = 0,
  param_mod = NULL, orth = TRUE)

spm12_condition_list(cond)

Arguments

name

Name of the condition

onset

vector of onset of the condition

duration

vector of duration of the condition, must be the same length as onset

time_mod_order

time modulation order. This option allows for the characterization of linear or nonlinear time effects. Zero means no modulation

param_mod

parametric modulation. Not currently supported in spm12r

orth

Orthogonalize the regressors within trial types.

cond

List of conditions

Value

A list of objects, each with a name, onset, duration, and other condition values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
res = spm12_condition(
name = "condition1", 
onset = c(0, 2, 4, 6, 8),
duration = rep(1, 5) )
print(res)
L = list(
cond1 = list(onset = c(0, 2, 4, 6, 8), duration = rep(1, 5)), 
cond2 = list(onset = c(0, 2, 4, 6, 8) + 1, duration = rep(1, 5))
)
res = spm12_condition_list(L)
print(res) 

spm12r documentation built on Sept. 3, 2018, 9:04 a.m.