sim_ts: Simulate fMRI Time Series

View source: R/simulate.R

sim_tsR Documentation

Simulate fMRI Time Series

Description

This function simulates an fMRI time series for multiple conditions with specified parameters.

Usage

sim_ts(ncond, nreps = 12, amps = rep(1, ncond), isi = c(3, 6), TR = 1.5)

Arguments

ncond

The number of conditions to simulate.

nreps

The number of repetitions per condition (default is 12).

amps

A vector of amplitudes for each condition (default is a vector of 1s with length ncond).

isi

A vector specifying the range of inter-stimulus intervals to sample from (default is c(3, 6)).

TR

The repetition time of the fMRI acquisition (default is 1.5 seconds).

Value

A list with two elements:

  • onset: A vector of the onset times for each trial.

  • mat: A matrix containing the simulated fMRI time series, with time in the first column and the simulated responses for each condition in the subsequent columns.


bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.