Giter VIP home page Giter VIP logo

talk_non-sphericity_correction's Introduction

Material to talk about sphericity correction in neuroimaging

Used for a journal club around the article Accurate autocorrelation modeling substantially improves fMRI reliability

Slides of the talk are here

A lot of the slides and format has been heavily influenced by Jeanette Mumford youtube series but it uses only matlab tools and has scripts that will go (should at least) get the data for you. It will also do the preprocessing, specify the model, run the GLM for you and then extract the data and so on. Things it does not do: serves you fries, your laundry, answer emails.

Another source of inspiration was Cyril Pernet and some of his great material for beginners to understand GLMs.

Those scripts will require matlab and SPM12 to run properly. I doubt this is fully octave compatible.

What do we have here?

inputs

This folder contains the ROI used to extract the data that will be playing with first.

SPM data sets will also be downloaded there.

stand alone scripts

depart_from_sphericity Script used to generate a 2D gaussian with different covariance matrix to compare white and coloured noise.

Also generate white noise residuals to simuate a 'perfect GLM' and see how ideal residuals should look like.

demos relying on the data sets from the SPM website

You can check how improving of your models will impact your betas and change your residuals.

To do this you first need to download, preprocess and run the basic GLM on either the auditory or face data set from SPM. Run the scripts block_01_data_preprocess_FFX.m or follow the instruction in event_01_data_preprocess_FFX.m

You then might need to create the ROIs that will be needed to extract the data we will play with. The script create_ROIs will do that for you. This should only be required if you are planning to use the ROIs from neurosynth as they need thresholding.

Extracting the data is done by the scripts *_02_extract_data.m. You can modify the scripts to say whether you want to use the neurosynth ROIs or the ROI of the biggest significant cluster (for the main effect) of the data set you want to play with.

Finally you can play around with different types of model by running the different sections of the misnamed *_03_HPF_sphericity_correction.m scripts and see how it changes the GLM results (run_GLM.m and plot_results_GLM.m will do that) and the residuals (plot_residuals does this).

talk_non-sphericity_correction's People

Contributors

remi-gau avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

mohmdrezk

talk_non-sphericity_correction's Issues

pre-whitening and group level analyses

Hi Remi,

In April you talked about a paper of mine at a journal club in Louvain. The paper was about pre-whitening, or as you prefer: non-sphericity correction :D From the very beginning I wanted to write to you, but was always busy and was postponing the email to the "next week" :( On one of your slides you referred to the impact of pre-whitening on group level analyses (slide 37):

https://docs.google.com/presentation/d/1aaYEnMzA9F7X84c0vxb0Zmf8NMxIIv9RonAQqSPJMew/edit#slide=id.g56ea4768e8_0_66

One of the reviewers wanted me to remove a short section of the paper which was related to group analyses, and which you might find interesting. It can be found in the biorxiv preprint though:

https://www.biorxiv.org/content/biorxiv/early/2018/09/02/323154.full.pdf

"As the above results suggest that the use of standard error maps changes the group results in a very limited way only, we investigated AFNI’s 3dMEMA by artificially re-scaling the statistic maps for one false positive analysis: “NKI rest (TR=1.4s)” dataset with assumed design 36s off + 36s on. For each subject, we multiplied the value of each voxel with 0.01, 0.1, 0.5, 2, 5 and 10. We observed a surprising negative relationship between the magnitude of the t-statistic maps and the amount of significant activation (Supplementary Table 4). Even when the t-statistics were extremely small (standard errors 100 times bigger compared to the original values), 3dMEMA found significant activation."

The Supplementary Table 4 is on the last page of:

https://www.biorxiv.org/content/biorxiv/suppl/2018/09/02/323154.DC1/323154-1.pdf

This shows that AFNI's 3dMEMA uses standard error maps (actually it uses coefficients and t-statistics, but this way one can get the standard errors) only to estimate the inter-subject variability, and does not account for the intra-subject variability. The link with the magnitude of the maps is related to a tweak in 3dMEMA, I believe ("Outliers are modeled with a Laplace distribution in cross-subject variability"):

https://www.sciencedirect.com/science/article/pii/S1053811911014625

It would be great to check how pre-whitening affects another mixed-effects group level model: FSL's FLAME, but I haven't done it. For SPM's summary statistic model, the impact of pre-whitening is limited. I argued that if there is residual positive autocorrelation at high frequencies, the sensitivity for event related designs goes down (both at the single subject and at the group levels), but it is a small effect. In any case, it is best to do proper pre-whitening and not to bother about possible problems, either at the single subject level, or at the group level.

Sorry for late message! And thanks for interest in my work!

Best,

Wiktor Olszowy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.