# Is there a test/model to tell whether an individual deviates from a group?

I'm working with time-series data on a handful (about 12) of individuals. Under normal conditions, the variable of interest for each individual is correlated among the group, i.e. if y is high for one individual, it's high for all individuals and vice versa (However, not necessarily 1:1). There are other variables x=(x_1,...,x_n) that can influence y for each individual differently and therefore explain some of the deviation from the group.

The problem: I want to test whether one individual at some point in time deviates from the group for a prolonged period of time, where the deviation cannot be explained by x. I am essentially looking for a point in time where the value of y for one individual can no longer be explained by the group. Is there a type of test or model that can achieve this?

• maybe add the tag anomaly-detection? Commented Jun 6, 2022 at 16:06
• Is this "one individual" specified as part of the test, or do you mean whether there exist one (or more) individuals that depart from the group?
– whuber
Commented Jun 7, 2022 at 15:05
• @whuber In this particular case, I know who the individual is, but the ideal model would also point out who the individual(s) is (are). Commented Jun 7, 2022 at 15:50
• @whuber Thank you! That is already a huge help Commented Jun 7, 2022 at 16:56
• @whuber I am working with daily data on the number of goods in stock for 12-60 companies. Under normal conditions, these numbers are determined by several variables, some of which are hidden or the exact relationship is too complex to model. However, we would expect that all companies choose their number of goods in stock to maximize profits, which leads to high correlation between different individuals. I suspect that at some point a particular company stopped maximizing profits and therefore its behavior could no longer be predicted by the group (and other control variables). Commented Jun 7, 2022 at 18:30