Repeated measures regression: An application to the analysis of mood and chronic pain