code to analyze behavioral data