You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was interested in comparing how low vs high PAC coupling looks, and so was interested in the included function to generate signals. However, I noticed that even when assigning high values of coupling (chi =0.0), pvalues aren't detected as significant above the permutations, though this isn't true when generating the signal with wavelet.
For instance, using:
f_pha = 6 # frequency phase for the coupling
f_amp = 90 # frequency amplitude for the coupling
n_epochs = 1 # number of trials
sf = 1000. # sampling frequency
n_times = 10*sf # number of time points
I get a similar region with high MI but it is no longer significant
And this is true with different noise levels, using dcomplex='hilbert' or 'wavelet', different methods of permutation calculation, different numbers of permutations, and different MI calculation methods (I have tried 2 for tort and 5 for gaussian copula). Is this an issue with the pac_signals_tort function, or an issue within the permutation generation?
The text was updated successfully, but these errors were encountered:
Hello,
I was interested in comparing how low vs high PAC coupling looks, and so was interested in the included function to generate signals. However, I noticed that even when assigning high values of coupling (chi =0.0), pvalues aren't detected as significant above the permutations, though this isn't true when generating the signal with wavelet.
For instance, using:
f_pha = 6 # frequency phase for the coupling
f_amp = 90 # frequency amplitude for the coupling
n_epochs = 1 # number of trials
sf = 1000. # sampling frequency
n_times = 10*sf # number of time points
data, time = pac_signals_wavelet(f_pha=f_pha, f_amp=f_amp, noise=0.8,
n_epochs=n_epochs, n_times=n_times, sf=sf, pp=0.0)
p = Pac(idpac=(2, 3, 0), f_pha=(2, 29, 1, .2), f_amp=(30, 120, 5, 1))
xpac = p.filterfit(sf, data2, n_perm=n_perm, n_jobs=4, random_state=0 ).squeeze()
xpac_smean = xpac[pval < .05].mean()
p.comodulogram(xpac, title='Modulation Index (MI)', cmap='viridis', vmin=0., pvalues=pval,
levels=.05)
I am able to produce the figure as given in https://etiennecmb.github.io/tensorpac/auto_examples/stats/plot_pvalues.html#sphx-glr-auto-examples-stats-plot-pvalues-py
However, when generating the signal using tort:
data, time = pac_signals_tort(f_pha=f_pha, f_amp=f_amp, sf=sf, n_times=n_times, n_epochs=n_epochs,
chi=0.0, noise=2.4, dpha=0.0, damp=0.0, rnd_state=0)
p = Pac(idpac=(2, 3, 0), f_pha=(2, 29, 1, .2), f_amp=(30, 120, 5, 1))
xpac = p.filterfit(sf, data, n_perm=n_perm, n_jobs=4,
random_state=0).squeeze()
pval = p.infer_pvalues(p=0.05)
xpac_smean = xpac[pval < .05].mean()
p.comodulogram(xpac, title='Modulation Index (MI) - wavelet', cmap='viridis', vmin=0., pvalues=pval,
levels=.05)
I get a similar region with high MI but it is no longer significant
And this is true with different noise levels, using dcomplex='hilbert' or 'wavelet', different methods of permutation calculation, different numbers of permutations, and different MI calculation methods (I have tried 2 for tort and 5 for gaussian copula). Is this an issue with the pac_signals_tort function, or an issue within the permutation generation?
The text was updated successfully, but these errors were encountered: