Print

Print


Armin,

This dummy.m script below should help.  For example, if you have 200 scans,
and scans 45, 47 and 48 were bad, this
Xd = dummy(200,[45,47,48]);
save Xd Xd.mat
will create the 3 columns you need to add to your design matrix and save
them in a mat file.  Then, use the 'MultipleRegressors' option in the 1st
level fMRI design specification to enter these as nuisance regressors.

-Tom


% Create dummy (indicator) variables
% FORMAT [X] = dummy(n,I)
% n   - Number of scans/rows
% I   - vector of scans/rows to model
%___________________________________________________________________________
%
% Creates dummy vectors, suitable for entering as additional regressors
% in a SPM analysis.
%
% If I has length p, then X is a n-by-p matrix of all zeros, except
% column k has a one at the I(k)'s row.
%
%___________________________________________________________________________
% $Id: dummy.m,v 1.1 2005/08/18 21:01:11 nichols Exp $

p = length(I);

X = zeros(n,p);

for i = 1:p
  X(I(i),i) = 1;
end

return


On Tue, Jul 29, 2008 at 9:16 AM, Armin Blickenstorfer <
[log in to unmask]> wrote:

> Dear Stephen,
>
> I'm fairly new to SPM and I'm interessted in a greater detail on how you
> would
> imply a new regressor.
>
> I hope I do not ask too much
>
>
> Armin Blickenstorfer
> PhD Student
>
>
____________________________________________
Thomas Nichols, PhD
Director, Modelling & Genetics
GlaxoSmithKline Clinical Imaging Centre

Senior Research Fellow
Oxford University FMRIB Centre