Skip to content

Commit

Permalink
update limo
Browse files Browse the repository at this point in the history
  • Loading branch information
dungscout96 committed Aug 15, 2024
1 parent d08dc03 commit b60caa4
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 16 deletions.
5 changes: 5 additions & 0 deletions code/plugins/reformat_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, formatted_name, order, li
'''.format(link=link, order=order)
text = f.read()
text = append_text + text

if plugin_name == 'LIMO':
with open(os.path.join(wiki_plugin_input_dir, 'Home.md')) as f:
text += f.read()

with open(index_file, 'w') as out:
out.write(text)
# main
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ parent: LIMO
grand_parent: Plugins
render_with_liquid: false

title: Within Subject Categorical Designs
long_title: Within Subject Categorical Designs
title: Within Subject Categorical Designs intro
long_title: Within Subject Categorical Designs intro
nav_order: 4
---
- [1 way repeated measures ANOVA (Famous, Unfamiliar, Scrambled faces as conditions)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/2.-One-way-repeated-measures-ANOVA-(Famous,-Unfamiliar,-Scrambled-faces-as-conditions)))
Expand Down
39 changes: 39 additions & 0 deletions plugins/limo/09.2.-Between-Subjects-Categorical-Designs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: default
parent: LIMO
grand_parent: Plugins
render_with_liquid: false

title: Between Subjects Categorical Designs
long_title: Between Subjects Categorical Designs
nav_order: 13
---
We replicate here the 1-way ANOVA with familiar, unfamiliar and scrambled faces but split the data in two age groups. Of course, we can take the txt files, edit them and save copies for each group – then in LIMO MEEG we simply use these files. Here, instead, we recompute the subjects model adding in the STUDY design our groups, which will consequently save txt files per group (but not change estimates per subjects). Since some subjects have unspecified age – we create three groups based on the median (figure 35).

Group 1 is under 26: sub- 3, 8, 15, 16, 17, 18
Group 2 is above or equal 26: sub- 2, 5, 9, 10, 11, 12, 14
Group 3: sub- 4, 6, 7, 13, 19 unspecified

![Figure 35. Edit study](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/master/resources/images/35.jpg)
_Figure 35. Editing STUDY adding groups_

You can update the study using pop_study typing in command line:
```matlab
cd(STUDY.filepath)
[STUDY ALLEEG] = std_editset( STUDY, ALLEEG, 'commands',{{'index',2,'group','1'}, ...
{'index',7,'group','1'},{'index',14,'group','1'},{'index',15,'group','1'}, ...
{'index',16,'group','1'},{'index',17,'group','1'},{'index',1,'group','2'}, ...
{'index',4,'group','2'},{'index',8,'group','2'},{'index',9,'group','2'}, ...
{'index',10,'group','2'},{'index',11,'group','2'},{'index',13,'group','2'}, ...
{'index',3,'group','3'},{'index',5,'group','3'},{'index',6,'group','3'}, ...
{'index',12,'group','3'}, {'index',18,'group','3'}}, 'updatedat','off','rmclust','on');
[STUDY, EEG] = pop_savestudy( STUDY, EEG, 'savemode','resave');
```

Estimate the models, selecting the 1st design with face type only. As before, text files are created, with additionally a split per group of LIMO/Beta/con files.

From here, we can perform two 2nd level analyses:
- [Between subjects’ ANOVAs with repeated factors](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/9.-Between-subjects%E2%80%99-ANOVAs-with-repeated-factors)
- [Two sample t-tests](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/10.-Two-sample-t-tests)


2 changes: 1 addition & 1 deletion plugins/limo/11.-Regression-among-subjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ render_with_liquid: false

title: Regression among subjects
long_title: Regression among subjects
nav_order: 16
nav_order: 15
---
In the [between subjects’ ANOVA with repeated factor](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/Between-subjects%E2%80%99-ANOVAs-with-repeated-factors), we artificially split subjects into young and old subjects. Such post-hoc splitting is not recommended and typically create spurious results. Instead, we could test how much age influences face perception. For this, we will use the contrast faces vs scrambled computed previously in the [one-sample t-test](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/5.-One-sample-t-test-(contrasting-Full-Faces-vs-Scrambled-Faces-at-the-subject-level)).

Expand Down
2 changes: 1 addition & 1 deletion plugins/limo/12.-Regression-at-the-trial-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ render_with_liquid: false

title: Regression at the trial level
long_title: Regression at the trial level
nav_order: 17
nav_order: 16
---
In previous analyses, the repetition levels were either averaged or used as a categorical variable. Here, we instead used the time between each repetition of the same stimulus – thus for a given subject we have 3 conditions (familiar faces, unfamiliar faces and scrambled faces) and one continuous variable (the distance between the repeat of a stimulus type).

Expand Down
26 changes: 14 additions & 12 deletions plugins/limo/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ render_with_liquid: false

# [Access Scripts reproducing the tutorial](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/tree/master/resources/code)

# [Preprocessing](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/1.-Preprocessing)
# [Preprocessing](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/01.-Preprocessing)
- getting the data
- preprocessing

# [Within Subject Categorical Designs](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/2.-Within-Subject-Categorical-Designs)
- [One way repeated measures ANOVA (Famous, Unfamiliar, Scrambled faces as conditions)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/2.-One-way-repeated-measures-ANOVA-(Famous,-Unfamiliar,-Scrambled-faces-as-conditions)))
- [One way repeated measures ANOVA revised (Famous, Unfamiliar, Scrambled faces as 1st level contrasts)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/3.--One-way-repeated-measures-ANOVA-revised-(Famous,-Unfamiliar,-Scrambled-faces-as-1st-level-contrasts))
- [Summary statistics to measure and report effects and effect sizes](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/4.-Summary-statistics:-Effects-and-Effect-sizes)
- [One sample t-test (contrasting Full Faces vs Scrambled Faces at the subject level)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/5.-One-sample-t-test-(contrasting-Full-Faces-vs-Scrambled-Faces-at-the-subject-level))
- [Summary statistics of differences](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/6.-Summary-statistics-of-differences)
- [Two-ways ANOVA (Faces x Repetition)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/7.-Two-ways-ANOVA-(Faces-x-Repetition))
- [Paired t-test (Famous vs Unfamiliar)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/8.-Paired-t-test-(Famous-vs-Unfamiliar))
# Within Subject Categorical Designs
- [Within Subject Categorical Designs intro](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/02.-Within-Subject-Categorical-Designs)
- [One way repeated measures ANOVA (Famous, Unfamiliar, Scrambled faces as conditions)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/03.1.-One-way-repeated-measures-ANOVA-(Famous,-Unfamiliar,-Scrambled-faces-as-conditions))
- [One way repeated measures ANOVA revised (Famous, Unfamiliar, Scrambled faces as 1st level contrasts)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/03.2.--One-way-repeated-measures-ANOVA-revised-(Famous,-Unfamiliar,-Scrambled-faces-as-1st-level-contrasts))
- [Summary statistics to measure and report effects and effect sizes](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/04.-Summary-statistics:-Effects-and-Effect-sizes)
- [One sample t-test (contrasting Full Faces vs Scrambled Faces at the subject level)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/05.-One-sample-t-test-(contrasting-Full-Faces-vs-Scrambled-Faces-at-the-subject-level))
- [Summary statistics of differences](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/06.-Summary-statistics-of-differences)
- [Two-ways ANOVA (Faces x Repetition)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/07.-Two-ways-ANOVA-(Faces-x-Repetition))
- [Paired t-test (Famous vs Unfamiliar)](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/08.-Paired-t-test-(Famous-vs-Unfamiliar))

# [Between Subjects Categorical Designs](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/Between-Subjects-Categorical-Designs)
- [Between subjects’ ANOVAs with repeated factors](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/9.-Between-subjects%E2%80%99-ANOVAs-with-repeated-factors)
# Between Subjects Analysis
- [Between subjects’ ANOVAs with repeated factors](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/09.1.-Between-subjects%E2%80%99-ANOVAs-with-repeated-factors)
- [Between Subjects Categorical Designs](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/09.2.-Between-Subjects-Categorical-Designs)
- [Two sample t-tests](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/10.-Two-sample-t-tests)

# [Designs with Continuous variables](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/Designs-with-Continuous-variables/)
# Designs with Continuous variables
- [Regression among subjects](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/11.-Regression-among-subjects)
- [Regression at the trial level](https://raw.githubusercontent.com/LIMO-EEG-Toolbox/limo_meeg/wiki/12.-Regression-at-the-trial-level)
16 changes: 16 additions & 0 deletions plugins/limo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,19 @@ You can also email directly or raise a github issue, in particular for bugs.
Anyone is welcome to contribute ! check here [how you can get involved](https://github.com/LIMO-EEG-Toolbox/limo_eeg/blob/master/contributing.md), the [code of conduct](https://github.com/LIMO-EEG-Toolbox/limo_eeg/blob/master/code_of_conduct.md).

Contributors are listed [here](https://github.com/LIMO-EEG-Toolbox/limo_eeg/blob/master/contributors.md)
# **Tutorial**

Details on the different functions and usage can be found on the [wiki pages here](https://github.com/LIMO-EEG-Toolbox/limo_tools/wiki) while this is a step-by-step tutorial.

_Important notice_

Whatever you display using LIMO plotting functions, all the variables are returned in the Matlab workspace. For instance, if you plot all channels vs time (ERP results), then the raw statistical map and the significance mask are returned. If you plot a time course, that time course with confidence interval is returned, etc. You may type "who" on the Matlab command line to see these variables.

## Getting started

The tutorial is using [Wakeman and Henson (2015)](https://www.nature.com/articles/sdata20151) face data. In short, famous, unfamiliar and scrambled faces were presented, and repeated immediately or later. Subjects had to do a judgment task orthogonal to the design to keep them engaged. The EEG channels were extracted and preprocessed. [DOWNLOAD THE DATA FOR THIS TUTORIAL HERE](https://openneuro.org/datasets/ds002718/versions/1.0.5) in BIDS format.

This tutorial assumes you are using the latest [EEGLAB](https://github.com/sccn/eeglab) version (2020.0 or later) that uses [STUDY](https://sccn.ucsd.edu/wiki/Chapter_02:_STUDY_Creation) to link with [LIMO tools](https://github.com/LIMO-EEG-Toolbox/limo_tools).



0 comments on commit b60caa4

Please sign in to comment.