Skip to content

Input Referred Models (Matlab)

mario.senden edited this page Jun 24, 2020 · 6 revisions

Using the IRM tool it is possible to estimate parameters of custom-defined input referred models. This requires specification of a parametric function describing the phenomenon one would like to map. This function should take a stimulus timecourse and a vector of parameter values as input. Additionally, a parameter space xdata needs to specified which the tool can explore. Specifically,xdataneeds to be a cell structure with one cell per parameter. Each cell can then contain a vector with the parameter values one would like to explore for that parameter. By using a cell structure, as opposed to a matrix, it is possible to explore different number of values for each parameter. The tool will explore every possible combination of parameter values.

Instantiation

The tool needs to be instantiated with a number of parameters:

  • f_sampling - sampling frequency of data acquisition (1 / TR)
  • n_samples - number of samples (functional volumes)
  • n_rows - number of rows (1st volumetric dimension of 4D data tensor)
  • n_cols - number of columns (2nd volumetric dimension of 4D data tensor)
  • n_slices - number of rows (3rd volumetric dimension of 4D data tensor)
parameters.f_sampling = sampling_frequency;
[parameters.n_samples,...
    parameters.n_rows,...
    parameters.n_cols,...
    parameters.n_slices] = size(data);
irm = IRM(parameters);

Usage

The tool works in three steps. First a stimulus needs to be passed to the function. Then, timecourses based on that stimulus, a function handle and the parameter space need to be generated. Finally, the parameters need to be estimated.

irm.set_stimulus(stimulus);
irm.create_timecourse(f,xdata);
results = irm.mapping(data);

The mapping function takes two optional arguments:

  • threshold - a mean signal intensity threshold below which a voxel is skipped (default = 100)
  • mask - a binary mask specifying for which voxels the analysis shouldbe carried out

The function returns a structure (results) with two fields:

  • corr_fit - correlation between observed and best fitting predicted BOLD signal
  • P - estimated parameters

These fields retain the volumetric dimensions of the data. Values for different parameters are along the fourth dimension of P.