Dear Gemma,
You do what you want just by doing something like:
S.refchan= {'M1', 'M2'};
in your code (assuming that your mastoid channels are called 'M1' and
'M2'). Note that in SPM8, you should use average reference for source
analysis and DCM so mastoid reference is only OK for sensor-level
stats.
Best,
Vladimir
On Wed, Feb 20, 2013 at 6:07 PM, Gemma Barnacle
<[log in to unmask]> wrote:
> Dear All,
>
> I'm working with an EEG data set and would like to re-reference the data to
> an average of the mastoid electrodes rather than an average of all
> electrodes.
>
> The script I'm using currently (for average of all electrodes) is:
>
> if reref==1
> prefix='MMedff';
> file=[prefix 'spm8_gemma_msc_' subj_dir(2:5) '.mat'];
> S = [];
> S.D = file;
> S.refchan=[1:64];
> D=spm_eeg_reref_eeg(S)
> end
>
> From reading the SPM manual I understand that you can re-reference using
> 'spm eeg montage' by entering '-1' in all the rows of the desired reference
> electrode column (except for the row that corresponds to itself where '0' is
> entered).
>
> However, I wonder if somebody can tell me if for my scenario where I wish to
> re-reference to an average of the two mastoid electrodes what the values
> would be? Would I be right in using '-.5' in the rows of both mastoid
> columns (and '0' in corresponding mastoid rows)?
>
> Also, as I'm working from a pre-processing script it would be useful to know
> if I could adapt the part of the script above to reflect my desired changes,
> rather than using the GUI? Could anyone advise me of how to do this?
>
> Any feedback would be much appreciated,
>
> Best Wishes,
> Gemma.
>
> Miss Gemma Barnacle
> PhD Student
> School of Psychology
> Room 119, Zochonis Building
> University of Manchester
> M13 9PL.
|