Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds example group-level analysis for phase-coherence effect #11

Merged
merged 8 commits into from Aug 21, 2019

Conversation

@JoseAlanis
Copy link
Owner

commented Jul 25, 2019

  • Plot the group-level effect of predictor phase-coherence in LIMO dataset (results consistent with Fig. 4 B3 in [1]
  • Add 95 % bootstrap CI.
  • [WIP]: Bootstrap T-values results.

Rendered fig.:
mean_beta_pc

@JoseAlanis

This comment has been minimized.

Copy link
Owner Author

commented Jul 25, 2019

sorry, don't pay attention to the commit message (forgot to update from other commit)

@dengemann

This comment has been minimized.

Copy link
Collaborator

commented Jul 25, 2019

@jona-sassenhagen

This comment has been minimized.

Copy link
Collaborator

commented Jul 25, 2019

Looks like a decent start.

@dengemann

This comment has been minimized.

Copy link
Collaborator

commented Jul 25, 2019

I notice a double bootstrap here.
One is for the subjects ?
For now I would keep the ERPs fixed. We can later propagate the uncertainty from level 1 to 2. What do you think ?

@jona-sassenhagen

This comment has been minimized.

Copy link
Collaborator

commented Jul 25, 2019

Simpler is better I guess. Reduce to the core added element and reduce overlap with other places.

@JoseAlanis

This comment has been minimized.

Copy link
Owner Author

commented Jul 26, 2019

I notice a double bootstrap here.
One is for the subjects ?
For now I would keep the ERPs fixed. We can later propagate the uncertainty from level 1 to 2. What do you think ?

double bootstrap? sorry I'm not sure what you mean. I'm taking random samples of subjects form the previosly computed betas-array; it contains the lm-results for each subject in th LIMO dataset. The average ERP is just the average of this results and the CI is computed with the random samples of subjects in line 144.

@dengemann

This comment has been minimized.

Copy link
Collaborator

commented Jul 26, 2019

The average ERP is just the average of this results and the CI is computed with the random samples of subjects in line 144.

You are right, I did not look carefully. You just looped over subjects. The heat in Paris ...

@JoseAlanis

This comment has been minimized.

Copy link
Owner Author

commented Jul 26, 2019

Hey guys, I added the code for the group-level one-sample t-test and bootstrap-t.
I computed the upper and lower boundaries for the bootstrap t-test (see lines 234-265). However, I'm not entirely sure about the computation of the p-values for the bootstrap-t. Essentially they should be equivalent to "the average number of times the T-values obtained from original data are above or below the bootstrap quantiles" (see [1]) ... still struggling to get the idea behind this procedure.

Anyways. Here the rendered results from the one-sample t-test (unmasked as no p-values so far) the fig are consistent with Fig. 4 B1 and B2 in [1]

1samp_tt
1samp_tt_topo

@dengemann

This comment has been minimized.

Copy link
Collaborator

commented Jul 26, 2019

@JoseAlanis can you show the T histograms along time? They are H1 and should thus be nice to look at, no?

@JoseAlanis

This comment has been minimized.

Copy link
Owner Author

commented Jul 29, 2019

Hey, good idea, something like this?

.120 s
thist_120

.160 s
thist_160

@JoseAlanis

This comment has been minimized.

Copy link
Owner Author

commented Jul 29, 2019

Hey I changed the bootstrap-t part a little bit, I misunderstood the approach the first time but should be consistent with the LIMO-paper now.
For completeness here are the rendered results of the group-level one-sample t-test (histograms are above).

t-image
t-map

@dengemann

This comment has been minimized.

Copy link
Collaborator

commented Jul 29, 2019

@JoseAlanis

This comment has been minimized.

Copy link
Owner Author

commented Jul 30, 2019

The boot-t was not quite right. I adapted the code to be consistent with whats done in the LIMO-toolbox; i.e., centering the bootstrap samples around the population mean (i.e., mean of original betas) and dividing by the standard error of the bootstrap sample to obtain the sample T-values.

Here the updated results:

Robust CI (computed using boot-t quantiles) for the group-level effect of phase-coherence:
beta_pc

Histogram of boot-t at around .120 s at electrode C1:
boot_t_120ms

Group-level one-sample t-test for phase-coherence showing full electrode*time space with significance level derived using boot-t technique (significant values are above or below boot-t quantiles):
1sampttest_masked

@jona-sassenhagen

This comment has been minimized.

Copy link
Collaborator

commented Aug 18, 2019

What are we waiting for here?

@JoseAlanis JoseAlanis requested a review from jona-sassenhagen Aug 20, 2019

@JoseAlanis JoseAlanis merged commit 55d010e into master Aug 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.