# Parametric modulation

The problem of constrained modeling of parametric modulation across events, allowing for flexible relationship between signal and parameter.

## Subversion repository

At: http://imaging.mrc-cbu.cam.ac.uk/svn/parameters/devel

For example:

`svn co http://imaging.mrc-cbu.cam.ac.uk/svn/parameters/devel parameters`

Then edit some file.

Then:

`svn commit -m 'A comment'`

And:

`cd parameters; svn update`

to get the latest repository data into your working copy in the `parameters` subdirectory.

## Work so far

The event-related study of Brett et al:

http://www.mrc-cbu.cam.ac.uk/~matthew/abstracts/ER/er_analysis.html

Parametric modulation approach described in:

- Estimating effects on effects using the Varying Coefficient Models by Ferath Kherif, Emmanuel A Stamatakis, Cristina Ramponi,Matthew Brett, Ian Nimmo-Smith, and Lorraine K Tyler

http://www.mrc-cbu.cam.ac.uk/Statistics/Methods/Resources/ferath_hbm2005.pdf

## The dataset

Described in Brett et al abstract and poster above.

Visual checkerboard events at random intervals. Sessions for which events are rapid (mean ISI 1 second) to slow (mean ISI 10 seconds). Evidence that interval between current and last event influences height and possibly shape of response. We wanted to be able to fit a curve relating the height of the event to the parametric modulator of time since last event.

We used region of interest time courses from the visual cortex to stabilize the signal.

## Code so far

Implemented in matlab, by Ferath and Ian. No modeling of

Ian has written a technical note in latex:

http://imaging.mrc-cbu.cam.ac.uk/svn/parameters/devel/docs/smoothed.tex

and the current pdf version is at:

http://imaging.mrc-cbu.cam.ac.uk/svn/parameters/devel/docs/smoothed.pdf

## Approach to problem

- Proper modeling of autocorrelation - maybe using R routines
- Modeling on ROI time-courses
- Model individual events, and constrain to have smooth relationship to paramter

## Plan

Reimplement model for ROI time course in NIPY - done - see http://imaging.mrc-cbu.cam.ac.uk/svn/parameters/devel/scripts/

- Address autocorrelation - partly done - can now run AR models with scipy,models code
- Implement parametric modulation within scipy.models
- Find suitable interface for expressing constrained modulation for models

See WorkingOutNipy for musings on the code structure of NIPY

## Analyses in R via rpy

See SCodebits for the SPlus code that we used in 2003. Will try to get these running in R and use the **rpy** R-to-python interface to compare these analyses with the current NIPY approach.