Confessions of a reforming Matlab-er

My name is Ben and I’m a self-taught programmer with no formal computer science training. A few years ago I gained the painful self-awareness that my scientific programming was shitty. I’m not saying it was wrong (I hope not) but it was just bad. I confused familiarity with my language of choice with proficiency. I had […]

Bayesian analysis toolbox for delay discounting, version 1.3

Posterior predictive checks The toolbox now calculates 2 measures of “goodness of fit” of the models. This is a useful quantitative reassurance that the models describe the participant discounting behaviour better than chance. In turn, this is important when we come to deciding which (if any) data files we should exclude. You can go and […]

Bayesian analysis toolbox for delay discounting, version 1.2

I’ve just released Version 1.2 of the toolbox ‘Bayesian analysis toolbox for delay discounting.’ The main feature of this release was the addition of new models. For example, you can now estimate discount rates (ignoring the magnitude effect). So you can obtain estimates of the discount rate k, which is very useful if your primary […]

Pimp your research code using UML class diagrams

Ideally, all research code should be made available at the point of submitting a paper. I’ve found that the way I write my research code has changed for the better now that I’ve made a commitment to making it open. However it can somewhat opaque and time consuming to understand, so how can we help those wanting to review, use, […]

Cognitive modelling 3: the importance of a script

One of the key things we must avoid is mess and confusion. In the last post I briefly covered one possible template for a research project. One of the reasons why cognitive modelling projects might be a little tricky is because you are not just using an off the shelf software package. For example, if […]

Cognitive modelling 2: project structure

What we definitely want to do is avoid confusion and mess. Having a clear project structure and workflow has many advantages. While there is no one single correct way to organise a project, putting a bit of thought into it, and learning from past projects can help a lot. This is the workflow that works for […]

Cognitive modelling 1: programming problems

This is the first post in a series exploring programming practice in cognitive modelling. While I have over a decade of experience in cognitive modelling, I am in no way an expert and have no formal computer science training. I am not an authority on this, I am feeling my way. Comments welcome. This post may […]

Plotting posterior predictive distributions

I’ve just released a small bit of Matlab code on GitHub which helps automate the job of plotting posterior predictive distributions. If you are inferring posterior distributions of parameters of a 1D function (e.g. y=mx+c) then this code will plot the posterior predictive distribution for you. This should be handy for you to eyeball how well a model […]