BookmarkSubscribeRSS Feed
Piers
Obsidian | Level 7

Hello,

 

I have individual time series data from 32 EEG channels. In the data, time runs from -200ms to 800ms. Zero is where a stimulus is presented. Two groups of subjects (10 patients v 20 controls) carried out four experimental conditions. My data have been averaged across trials, separately for each group, participant and condition. In other words, for each participant I have a separate time series for each condition, which has been averaged across trials.

 

For individual EEG channels I want to overplot the average EEG signal for both groups (on the y-axis) as a function of time (from -200 to 800ms, in 10ms increments), and indicate where in time the two time series are statistically significantly different from each other - i.e. effectively a set of multiple pairwise comparisons, one for each time point.

 

So far, to deal with the fact that we have a repeated measures design, I have used PROC MIXED as follows:

 

ods output diffs = diff;
PROC MIXED DATA=mlm2 COVTEST METHOD=ML;
 CLASS sub group time; 
  MODEL EEGdata = group time group*time / SOLUTION
                                                                        OUTP=pred;
  RANDOM INTERCEPT / SUBJECT=sub TYPE= un;
  LSMEANS group*time / diff;
run;

 

data subset; set diff;
 if group = _group then delete;
 if time ^= _time then delete;
 timepoint_id = group||_group||time1;
 raw_p = Probt;
  keep timepoint_id raw_p;
run;

 

proc multtest inpvalues=subset holm hoc fdr;
run;

 

The general idea was to use LSmeans to get a set of pairwise comparisons which would give me a complete set of uncorrected t-tests. Then select the ones I want and run those p-values through proc multtest to do the statistical corrections. I would have liked to use the slice option, but could not find a way to obtain adjustments for the p-values, directly, so I settled on this rather clumsy route. I know you can use the adjust option in the lsmeans statement, but the only way I could think of using this to prevent computing all pairwise comparisons (thereby obtaining a very conservative adjustment as a result), was to use the lsmestimate route - but coding that looked horrific with 100 time points.

 

In summary:

 

1) Does anyone see an objection to the  use of proc mixed to run the basic model in this way?

2) I am aware that taking account of autocorrelation in the data would be ideal, but including a random effect like this:

    random intercept time / subject=sub type=ar(1)

    caused the models to run forever, even when I resampled the timeseries to a much coarser scale. This also made me think that I          might be doing something wrong.

3) Are there better / smarter / more elegant ways of obtaining the pairwise comparisons I am seeking.  

 

Bottom line, help needed please ....

 

Thanks

 

Piers C 

2 REPLIES 2
pink_poodle
Barite | Level 11

I am only just starting to use SAS on EEG time series. It might be helpful to use SAS Enterprise Miner, which is a part of SAS software package for the universities. 

pink_poodle
Barite | Level 11
Please also check my post, since you seem to have more experience, perhaps you would have some suggestions...:
https://communities.sas.com/t5/SAS-Data-Mining-and-Machine/EEG-brain-data-survival-mining/m-p/630997...

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 633 views
  • 1 like
  • 2 in conversation