Skip to contents

This function generates a continuous valued event set object from a given matrix. It is useful for creating event sequences with multiple continuous predictors for fMRI data analyses.

Usage

event_matrix(mat, name, onsets, blockids = rep(1, ncol(mat)), durations = NULL)

Arguments

mat

A matrix of continuous event sequence values, with one row per event

name

A character string providing a name for the event set

onsets

A numeric vector of onsets for each event in the sequence

blockids

A numeric vector of block identifiers for each event in the sequence (default: 1)

durations

A numeric vector of durations for each event in the sequence (default: NULL)

Value

An object representing the continuous valued event set, with class "event_matrix" and "event_seq"

Examples

mat <- matrix(rnorm(200), 100, 2)
onsets <- seq(1, 1000, length.out=100)
durations <- rep(1, 100)
blockids <- rep(1, 100)

eset <- event_matrix(mat, "eset", onsets, durations, blockids)