spm12_regressor: Build Regressors for SPM12 first level model

Description Usage Arguments Value Examples

View source: R/spm12_regressor.R

Description

Build Regressors for SPM12 first level model

Usage

1
2
3
spm12_regressor(name, value, n_time_points)

spm12_regressor_list(reg, n_time_points)

Arguments

name

Name of the regressor

value

Value of the regressor, must be the same length as n_time_points

n_time_points

Number of time points for the analysis

reg

List of regressors

Value

A list of objects, each with a name and value

Examples

1
2
3
4
5
6
7
8
9
res = spm12_regressor(name = "condition1", value = c(
rep(1, 10), rep(0, 10)), n_time_points = 20)
print(res)
L = list(
cond1 = list(value = c(rep(1, 10), rep(0, 10)), n_time_points = 20),
cond2 = list(value = c(rep(0, 10), rep(1, 10)), n_time_points = 20)
)
res = spm12_regressor_list(L, n_time_points = 20)
print(res)

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