Learn R Programming

spm12r (version 2.8.3)

spm12_regressor: Build Regressors for SPM12 first level model

Description

Build Regressors for SPM12 first level model

Usage

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab