Analysing sequences of behavioural events