Showing posts in category

**Code**. Show all posts
Showing posts in category **Code**. Show all posts

After a hard disk failure in the office I am setting up a more comprehesive backup system. The bulk of it consists of using rsync to periodically synchronise data on my workstation with NFS mounts. Each time I run rsync, I want to check that the destination directory is...

The previous post on quantization dealt with binning a continuous variable into a small number of discrete categories. But sometimes the source data is already discrete, for example when the data are counts (e.g. counts of spikes emitted by a neuron within a certain time window). Sometimes the raw...

In my work I make heavy use of mutual information. One interpretation of mutual information is as (with a sample size dependent scale factor) the effect size for a likelihood-ratio test of independence. This is similar to a Chi-squared test of independence; in fact the chi-squared test...

In an earlier post I showed how to improve performance when saving large numerical arrays. However, often when working with FieldTrip, which uses complex nested structures and cell arrays to represent data, it is not easy to convert these structures into contiguous arrays. This very detailed post on the UndocumentedMatlab...

I found that some of the MEG data I am working with has long tails which was causing some problems when using non-robust statistics that assume normality. Visual inspection showed a t-distribution might be a good fit: The figures show the histogram of the data, together with the...