Jörn Alexander Quent's notebook

where I share semi-interesting stuff from my work

Understanding the basics of the general linear model (GLM) in the context of fMRI

Prelude Sources that I found useful General libraries Simple linear regression Multiple linear regression Special cases One sample t-test Two sample t-test Paired t-test Two-way ANOVA Does the contrast weighting matter for the test-statistics? Covariance matrix of the residuals A example design matrix for fMRI Multiple testing problem Calculate FWE FWE correction Random field theory Permutation tests FDR Conclusion Glossary Prelude I was revisiting some of the basics surrounding fMRI especially the GLM and contrasts. Read more →

Matlab function to create stacked texture maps for Unity

I’ve been experimenting with different materials and shaders in Unity recently. One problem is that especially if you want use the same texture for the same large object you get these nasty tiling effects: Luckily, I found this obscure shader on Unity’s GitHub page, which is amazing but it asked for something called a map texture, which took me ages to figure out. Read more →

Finding a U-shape with Bayesian interrupted regression

The outset of the problem In one of my project, I’d like to show that there is a U-shape relationship between two variables. The traditional way to do this would be to fit a quadratic model and test whether the quadratic term is different from zero. However, Simonsohn (2018) among other correctly points out that evidence for a quadratic fit is not enough and there might be situations where the quadratic term is not zero but there is no true u-shape. Read more →