KernelGrangerCausality icon indicating copy to clipboard operation
KernelGrangerCausality copied to clipboard

which script consists of kernel granger casuality function?

Open manvirvirk opened this issue 2 years ago • 10 comments

manvirvirk avatar Nov 18 '23 08:11 manvirvirk

causality.m is the main function, it calls other ones.

danielemarinazzo avatar Nov 18 '23 18:11 danielemarinazzo

Thanks for the information, i could use it now. I have one more query how to apply granger causality for non-stationary signals as it is meant that it can be applied only for stationary signals.

manvirvirk avatar Nov 23 '23 06:11 manvirvirk

If your time series do not satisfy the stationarity criterion of your choice, then you should use a sliding window (if you have enough samples per window and/or multiple trials), or use another time varying approach.

danielemarinazzo avatar Nov 23 '23 08:11 danielemarinazzo

@danielemarinazzo i have non stationary brain signal with several trials. I have filtered it and windowed it into 2s segment. After this i got matrix of 500 by 35 to which i applied granger to select columns . Is this the way you you are saying?

manvirvirk avatar Nov 23 '23 09:11 manvirvirk

and where are you using the trials? what is 500 and what is 35?

danielemarinazzo avatar Nov 23 '23 10:11 danielemarinazzo

@danielemarinazzo 500 are trials and 35 are number of channels of brain signals

manvirvirk avatar Nov 23 '23 14:11 manvirvirk

This indeed allows you to perform a time point by time point analysis, but not Granger causality since all data refers to the same time point. The minimal window should be equal to the order of your auto regressive model plus one.

On Thu, 23 Nov 2023, 15:23 manvirvirk, @.***> wrote:

@danielemarinazzo https://github.com/danielemarinazzo 500 are trials and 35 are number of channels of brain signals

— Reply to this email directly, view it on GitHub https://github.com/danielemarinazzo/KernelGrangerCausality/issues/2#issuecomment-1824520834, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIQU7T5DV4WK2QPBRVKLU3YF5L6BAVCNFSM6AAAAAA7Q2HM5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUGUZDAOBTGQ . You are receiving this because you were mentioned.Message ID: @.***>

danielemarinazzo avatar Nov 23 '23 15:11 danielemarinazzo

@danielemarinazzo does this repo, causality.m find the granger causality or not?

manvirvirk avatar Nov 23 '23 17:11 manvirvirk

the repo or the function? The function causality.m computes Granger causality indeed.

On Thu, 23 Nov 2023 at 18:20, manvirvirk @.***> wrote:

@danielemarinazzo https://github.com/danielemarinazzo does this repo, causality.m find the granger causality or not?

— Reply to this email directly, view it on GitHub https://github.com/danielemarinazzo/KernelGrangerCausality/issues/2#issuecomment-1824751611, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIQU7X5IYMHJWLZIW347CTYF6AUTAVCNFSM6AAAAAA7Q2HM5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUG42TCNRRGE . You are receiving this because you were mentioned.Message ID: @.***>

danielemarinazzo avatar Nov 23 '23 20:11 danielemarinazzo

ok thank you for the help @danielemarinazzo (y)

manvirvirk avatar Nov 24 '23 08:11 manvirvirk