[Eeglablist] mixed model for EEG data

Stephen Politzer-Ahles spa268 at nyu.edu
Sun Jun 21 06:54:54 PDT 2015


Hello David,

Using RMS amplitude rather than mean amplitude should be straightforward,
you can just use the rms() function rather than the mean() function. As for
papers that do this kind of analysis, Olaf shared some above (in
particular, Amsel et al., 2011, seem to use basically the same kind of
analysis as the code I sent above), and here are a few others off the top
of my head that I believe take more or less the same route:

http://www.ncbi.nlm.nih.gov/pubmed/21981676
http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0015024

Best,
Steve




Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab
http://www.nyu.edu/projects/politzer-ahles/

On Sun, Jun 21, 2015 at 5:03 PM, David Jackson Morris <dmorris at hum.ku.dk>
wrote:

>  Hi Stephen,
>
> Thanks for your thoughts and the code.  I'm going to try this with RMS
> amplitude for each trial instead of mean amplitude, because I'm looking at
> the acoustic change complex, and the attached paper suggests that it is a
> strong correlate of phonemic perception.  Do you know of any papers that
> have used a route similar to the one that you've sketched for me below?
>
>  Thanks again for your help.
>
>  Best wishes
> David
>
>
>  ------------------------------
> *From:* politzerahless at gmail.com [politzerahless at gmail.com] on behalf of
> Stephen Politzer-Ahles [spa268 at nyu.edu]
> *Sent:* Sunday, June 21, 2015 7:48 AM
> *To:* David Jackson Morris
> *Cc:* Lampros Perogamvros; eeglablist at sccn.ucsd.edu
> *Subject:* Re: [Eeglablist] mixed model for EEG data
>
>    Hello David,
>
>  I'm not aware of any built-ins for doing this, but it is fairly
> straightforward using just basic MATLAB functions. The specifics depend on
> how your data have been processed, how your trial-level predictor info is
> coded, etc, how you plan on doing the analysis, etc. Here's a simple
> example that assumes no trials have been removed (i.e., trial n of EEG
> corresponds to the nth predictor value that will go into the model), that
> the predictors are stored in a separate logfile that was generated by the
> stimulus presentation software (as opposed to, e.g., in the EEG event codes
> themselves), and that the analysis will only look at one time window and
> one channel. It could of course be tweaked to handle different situations
> than those described above.
>
>
>
>  % the time range (inclusive) to average over
>  time_window = [150 250];
>
>  % the channel to use
>  channame = 'Fz';
>
>  % find all samples within this time range
>  samples = find( EEG.times>=time_window(1) & EEG.times<=time_window(end)
> );
>
>  % find the index of the channel
>  chanidx = find( arrayfun( @(x)( strcmpi( EEG.chanlocs(x).labels,
> channame ) ), 1:EEG.nbchan ) );
>
>  % get the window mean amplitude for each trial
>  data = squeeze( mean( EEG.data( chanidx, samples, : ), 2 ) );
>
>  % write out to text
>  dlmwrite( ['voltages_' channame '_' num2str(time_window(1)) '-'
> num2str(time_window(end))], data );
>
>  % the next step is to read those values back into R, along with whatever
> other file contains the trial-by-trial predictors that you want to regress
> these values on
>
>
>
>  Stephen Politzer-Ahles
> New York University, Abu Dhabi
> Neuroscience of Language Lab
> http://www.nyu.edu/projects/politzer-ahles/
>
> On Thu, Jun 18, 2015 at 3:17 AM, David Jackson Morris <dmorris at hum.ku.dk>
> wrote:
>
>>  Hi all and Lampros,
>>
>>  This is a very interesting thread and it would be good to see a
>> follow-up to this.  I also wonder if anyone has any experience porting
>> preprocessed data to R?
>>
>>  Best wishes
>> David
>>
>>
>>
>>
>>   *David Jackson Morris*
>>  Postdoc
>>
>>  *Københavns Universitet/University of Copenhagen*
>>  INSS/Department of Nordic Studies and Linguistics
>> Audiologopædi/Speech Pathology & Audiology
>>  Njalsgade 120
>>  2300 København S
>>
>>  Office 22.5.14
>>  TLF 35328660
>> dmorris at hum.ku.dk
>>
>>  ------------------------------
>> *From:* Lampros Perogamvros [lambros.pero at gmail.com]
>> *Sent:* Tuesday, June 16, 2015 1:44 PM
>> *To:* eeglablist at sccn.ucsd.edu
>> *Subject:* [Eeglablist] mixed model for EEG data
>>
>>    Hi all,
>>
>>  We were just wondering whether you guys ever implemented a mixed model
>> analysis for eeg data, and if so how you did it/setup the model? This
>> model would be ideal when there are unequal numbers of observations per
>> condition, and sometimes 0 observations for a condition for a given
>> subject. This model would allow us to use all the data and do
>> statistical tests on the individual observations rather than just averaging
>> over all the observations for each subject, so it would be much more
>> powerful. Are you aware of any such model for EEG?
>>
>>  Thanks!
>>  Lampros Perogamvros MD
>>  University of Wisconsin
>>
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to
>> eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to
>> eeglablist-request at sccn.ucsd.edu
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20150621/61a67183/attachment.html>


More information about the eeglablist mailing list