Print

Print


when specifying the estimation yuu can ask to save residuals :-)
there is also the function spm_write_residuals

  Write residual images
  FORMAT Vres = spm_write_residuals(SPM,Ic)
  SPM    - structure containing generic analysis details
  Ic     - contrast index used to adjust data (0:   no adjustment)
                                              (NaN: adjust for everything) 
 
  VRes   - struct array of residual image handles

Cyril

--
Dr Cyril Pernet,
Centre for Clinical Brain Sciences (CCBS)
Neuroimaging Sciences

The University of Edinburgh
Chancellor's Building, Room GU426D
49 Little France Crescent
Edinburgh EH16 4SB
[log in to unmask]
http://www.sbirc.ed.ac.uk/cyril
http://www.ed.ac.uk/edinburgh-imaging


________________________________________
From: SPM (Statistical Parametric Mapping) <[log in to unmask]> on behalf of Colin Hawco <[log in to unmask]>
Sent: 16 March 2016 19:42
To: [log in to unmask]
Subject: [SPM] Extracting time course residuals in first level

I want to do a seed based connectivity analysis on a data set with tasks involved. But we want specifically ‘background connectivity’, the BOLD time series with task related effects regressed out of the model (I have reasons in this case for favoring this approach over something like PPI).

Is there any way to export the residual time series from the SPM data? As best I can see, it looks like I am going to need to manually fit the model with the beta values in the beta.img files, and regress it out manually. I am not 100% sure that would really be identical to what I would get if SPM was fitting the 1st level model voxel-wise and outputting the residual time series.

If there is a better way to do this I would appreciate any advice.


Colin Hawco, PhD
Neuranalysis Consulting
Neuroimaging analysis and consultation
www.neuranalysis.com
[log in to unmask]

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.