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 […]

# Tag archives: parameter estimation

## 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 […]

## Slice sampling Matlab demo

So far we’ve had a look at rejection sampling and importance sampling. Here we take a quick look at slice sampling, although rather than implementing it ourselves, we will use the built in Matlab slicesample function. Using our parameter estimation example, we will use slice sampling to estimate the mean and sigma of some samples from […]

## Importance sampling Matlab demo

Importance sampling is related to rejection sampling, which I looked at in the last post. Here is a short demo. A problem of rejection sampling is that many samples could be evaluated in regions of low probability mass. This then lead to a high rate of attrition, with many samples being rejected. In importance sampling, this seems […]

## Rejection sampling Matlab demo

I’ve been using MCMC, but I’ve wanted to flesh out my knowledge and explore the space of sampling approaches a little more. One very simple, yet inefficient method, is rejection sampling. Here is a little Matlab example I put together after seeing how easy it was. Which results in this output. So we have a good […]