[FieldTrip] Using Akaike Information Criterion for order selection with ft_mvaranalysis
Nitzan Uziely
linkgoron at gmail.com
Mon Sep 29 11:46:38 CEST 2014
Hi again,
Just to clarify the above, here is the code that I use to calculate the AIC:
"source" is my inverse-solution after being partitioned into virtual
channels using the AAL atlas.
% mvar analysis.
cfg = [];
cfg.order = order;
cfg.toolbox = 'bsmart';
mdata = ft_mvaranalysis(cfg, source);
% aic calculation: www.ncbi.nlm.nih.gov/pmc/articles/PMC2585694/
k = size(source.label,1);
p = cfg.order;
logv = log(det(mdata.noisecov)); % this gives me inf,
as det(mdata.noisecov) is 0.
% look at source
nTotal = size(source.time,2)*length(source.time{1});
aic = -logv + 2*p*(k^2)/nTotal;
disp(strcat(['order:' num2str(order) ', aic:',num2str(aic)]));
Any ideas would be greatly appreciated!
Best,
Nitzan
On Fri, Sep 26, 2014 at 9:24 PM, Nitzan Uziely <linkgoron at gmail.com> wrote:
> Hi,
>
> My name is Nitzan Uziely, and I'm a student (under-grad) at the Hebrew
> University of Jerusalem.
>
> I'm using fieldtrip to process EEG signals at our lab, and I'm trying to
> run a PDC analysis on my data.
>
> I took the data, calculated the inverse-solution and segmented it into
> virtual channels using the AAL atlas.
>
> I'm trying to to calculate the correct order for the ft_mvaranalysis
> function.
> I've seen a previous question that went unanswered a few years ago about
> order selection (
> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003947.html).
>
> Following the above question, I searched how to calculate the Akaike
> Information Criterion (AIC) to calculate the correct model order. According
> to http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2585694/ I need to
> calculate the determinant of the noise covariance matrix, however the
> determinant (I've checked orders 1 to 10) is so small that matlab just
> rounds it to zero. This makes me feel that either I have a problem, I've
> misunderstood how to calculate AIC to select the correct model, or that AIC
> is not the correct way to go.
>
> So, my question is - does it seem that is something wrong with my data
> (which can be seen by the small determinant), am I misunderstanding the
> requirement of the determinant or is there a better way to select the order
> of the mvar model. (oh, I'm using mdcfg.toolbox = 'bsmart'; if it matters)
>
> Thanks,
>
> Nitzan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140929/cae5061b/attachment-0002.html>
More information about the fieldtrip
mailing list