Blog

Permutation Test for matlab

This is taken and copied from github/behinger/permtest: I couldn’t find a simple permutation test for matlab, thus I decided to implement it on my own. I got inspired by the “statmod”-R package and followed Phipson & Smyth 2010’s recommendations. How to Use: [code lang=matlab] permtest(randi([1,5],100),randi([3,8],100)) permtest(randi([1,5],100),randi([3,8],100),10000) permtest(randi([1,5],100),randi([3,8],100),[],\"conservative\") % usually the fastest implementation [/code] Permutations / Randomization I chose to do permutations with repeats. This complicates p-values, but in the end I found it to be faster (and scales better). P-Values There are three methods implemented to get the p-value: b = permutations with greater value than test-statistic m_t = number…

Dummy coding and Effects coding

A small fact got me into trouble (spoiler: the intercept in effects coding represents the mean of conditions, not the data-mean). Update 2016-08-11 I found a nice paper that remedies the last point: weighted effects coding Update 2018-11-30 If you enjoyed reading this post, check out my sucessor post on Effect/Sum Coding Update 2019-07-22 I highly recommend this recent paper: How to capitalize on a priori contrasts in linear (mixed) models: A tutorial (2019) which will explain all things of this blogpost in more space, more examples, more code and with better words! The goal We try to model two…

Lilli Kaufhold: The influence of Fixation Durations on the Initiation of Saccades

One of my Master students (Lilli Kaufhold) finished her thesis on parts of this study (manuscript forthcoming). I took the opportunity to form her work into a pice of art. It is a meta-study of an eye-tracking study. I recorded my eye-movements while reading her thesis about eye movements(using these cool 3D-printable open source eye trackers!) . Every red dot is a fixation (a moment where the eye stayed still) and every line connects two fixations with an eye movement. It is clear that I focused on the words, but some figures elicit specific eye tracking behaviour. Of course it…

Statistics: Cluster Permutation Test

I sometimes give improvised lectures to a small circle of students. These are some of the explanations I use. The goal Find time-points in a time series that differ between two conditions over subjects without performing single independent tests for each time-point. Step by Step Guide In this tutorial, we apply the cluster-permutation test to a single time-series. This could be a single channel, an average over channels, or one “source/component” from an ICA decomposition. We can make use of the neighbour-relation of time: $t$ has the neighbors $t-1$ and $t+1$. We don’t expect the time points to be independent,…

Katja Häusser: Psychophysical Study on the Temporal and Nasal Visual Hemifields and the Blind Spot

One of my Bachelor students (Katja Häusser) finished her thesis on parts of this study (manuscript forthcoming). This is the first piece of art I made based on a thesis. For this one, I reconstructed the main stimulus used in the psychophysics study by the complete text of the thesis. The idea is to inspire discussion with people who do not necessarily have an academic background. The thesis might be hidden in the drawer, or is incromprehensible for people outside of science, but the poster is out there at the wall for everyone to see. I hope to start a…

Sun Grid Engine Command-Dump

Here in the institute we have a Sun Grid Engine available. It is a tool to post computing-jobs on other workspaces (we have I think up to 60 available). There are certain commands and things that I do regularly which I tend to forget after half a year, or which might be useful for orthes. Show all jobs that are running on the grid qstat -u \* or alternativly for a single user qstat -u behinger exclude a single computer/host from running a job qsub -l mem=5G,h=!computername.domain script.sh to exclude multiple hosts: h=!h4&!h5 or h=!(h4|h5) Source of course mem=5G is…

Matlab winsorized mean over all dimension

This is a function I wrote back in 2014. I think it illustrates an advanced functionality in matlab that I hadn’t found written about before. The problem: Calculate the winsorized mean of a multidimensional matrix over an arbitrary dimension. Winsorized Mean The benefits of the winsorized mean can be seen here: We replace the top 10% and bottom 10% by the remaining most extreme value before calculating the mean (left panel). The right panel shows how the mean is influenced by a single outlier, but the winsorized mean is not (ignore the “yuen”-box”) Current Implementation I adapted an implementation from…

An interactive ICA tutorial

Some years ago, I wrote an interactive tutorial for ICA using D3.js and some java-script but never published it. Now I let it fly. I got inspired by this page from Arnould Delorme. Click the Image or the link here I also gave a presentation about ICA using the tool which you can find here If you find mistakes or problems please drop me an email.

6 of 6
123456