## Attendance

![qr code](images/2024-25-qr-code.png)

## Today

::: fragment
**Assessment**

-   A bit more detail on the written assessment
-   General advice on writing, structure
:::

::: fragment
**The General Linear Model (GLM)**

-   intuition / non-mathematical explanation
-   some of the nitty-gritty (in `matlab`)
-   demo in `fsl`
:::

::: fragment
**Kinds of designs**

-   task, resting state, connectivity, ...
:::

## Learning objectives

By the end of the lecture you should:

-   know what's expected in coursework
-   have all the information to get started on assessment
-   understand the GLM in principle
-   appreciate some of the technical details of GLM analysis
-   have some knowledge of different kinds of "designs" / approaches to fMRI for neuroscience

## Assessment

-   Written assignment (max 3000 words) including a 250 word abstract.

-   Details on [moodle (2024/25)](https://moodle.nottingham.ac.uk/course/view.php?id=137637#sectionid-1830447-title).

> The written assignment for this module is an essay about how functional magnetic resonance imaging and/or brain stimulation can be used to study different neuroscience questions. It should cover two topics and/or methods from the course.

## Not just a literature review

> One aim of the assignment is to make you think about the methodological choices the experimenters have to make. After a brief summary of the state of the literature in your area, there should be therefore be a component that talks about how you might extend some previous findings.

## On moodle {.scrollable}

![word doc template](images/course-work-snap.png)

## Guided submission {.scrollable}

There are very specific suggestions for how you can tackle each section in turn

**overall word limit, 3000w - stick to this limit**)

-   Title of project (suggested \~10 words)
-   Lay Summary (max 250 words, one paragraph)
-   Scientific Summary (max 250 words, one paragraph)
-   Background of the project (suggested 600 words)
-   Questions to be answered (suggested 200 words)
-   Plan of investigation (suggested 500 words)
-   Details of data analysis (suggested 500 words)
-   Expected outcomes (suggested 200 words & 1-2 figures)
-   Theoretical & practical implications (suggested 500 words)
-   References

## Things that you might wonder about:

-   Plan of investigation (suggested 500 words)

::: {style="color:darkgreen;"}
-   Details of data analysis (suggested 500 words)
-   Expected outcomes (suggested 200 words & 1-2 figures)
:::

> But I don't have any data (yet?). How to square that circle??

## What do we look for?

::: fragment
**Content**

The **content** of your coursework is (obviously) important - topic choice - methodological details included - facts correct?
:::

::: fragment
**... but writing!**

-   clear, concise, economic
-   line of argument?
-   structure easy to follow
-   ...
:::

## Strunk & White - *Elements of Style*

If you haven't read this little book (26 pages), take the time!

[free online PDF of the book](https://faculty.washington.edu/heagerty/Courses/b572/public/StrunkWhite.pdf)

## The GLM - a quick walk-through

### Some notes for my demo

``` bash
cd ~/projects/hands-on-brain-data
julia
# using Pluto
# Pluto.run()
# "what_is_linearReg.jl"
```

## in `matlab`

### Some notes for my demo

``` matlab
cd ~/projects/hands-on-brain-data
cd data
X = load('design-3.txt')
y = load('timecourse.txt')
X\y
% regress(), pinv()
```

## in `fsl`

``` bash
cd ~/projects/hands-on-brain-data-demo
cd data
fsleyes filtered_func_data
fsl &
# simple block design ... stats: 6, (12, 12, 12)
```

## in `fsl`/`fsleyes`

![](images/fsleyes_grab.png)

## Kinds of designs / approaches

Two directions, in which people elaborate experiments:

1.  **tasks, stimuli** have become more sophisticated
2.  **data analysis methods** are changing all the time

## Tasks

You can find lots of versions of these across all domains of cognitive neuroscience...

::: incremental
-   task-based experiments
    -   block designs, event-related designs, mixed, ...
    -   "continuous" (eg watching movies)
-   resting state fMRI (rsFMRI)
:::

## Analysis methods

-   GLM, linear regression (the "workhorse" of fMRI analysis)

-   data-driven methods (search for patterns in the data)

    -   *independent component analysis*, ICA (dimensionality reduction techniques)
    -   seed-based correlation methods
    -   network analysis, ...

-   machine learning, *decoding*

## GLM

We have just seen a bit more of this in action

## Resting state fMRI

![example rs analysis](images/smith-fig-1-rs.png)

[Smith et al, 2012, PNAS](https://www.pnas.org/doi/epdf/10.1073/pnas.1121329109)

## Decoding, multivariate analysis

Variously: *classification*, SVM (support vector machines), decoding, even "mind reading", ...

::: fragment
**Aim:** try to use **data** - the pattern of activity across many voxels (and trials) - to figure out which stimulus was being displayed.
:::

## First use, classic reference

![Kamitani and Tong, 2005](images/41593_2005_Article_BFnn1444_Fig1_HTML.png)

[Kamitani & Tong, 2005](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1808230/)

## Thanks

::: r-fit-text
Hope you found this helpful.

See you soon!
:::

## Colophon {.smaller}

-   This presentation was made with `quarto` and `revealjs`.

-   Uses a font called `Atkinson Hyerlegible`, which was designed to work better for people with low vision: available via [google fonts](https://fonts.google.com/specimen/Atkinson+Hyperlegible).
