If we define the variable O_i, which takes value equal to 1 when ith observation
is an outlier, and 0 otherwise, then we propose to calculate the probability of
an observation being an outlier as:
$$P(O_{i} = 1) = \frac{1}{n-1}\sum{P(v_{i}>v_{j}|data)} \quad (1)$$
We believe that for points, which are not outliers, this probability should be
small, possibly close to zero. Given the natrual ordering of the residuals, it is
expected that some observations present greater values for this probability in
comparison to others. What we think that should be deemed as an outlier, ought to
be those observations with a higher \(P(O_{i} = 1)\), and possibly one that is
particularly distant from the others.
The probability in the equation can be approximated given the MCMC draws, as follows
$$P(O_{i}=1)=\frac{1}{M}\sum{I(v^{(l)}_{i}>max v^{k}_{j})}$$
where \(M\) is the size of the chain of \(v_{i}\) after the burn-in period and
\(v^{(l)}_{j}\) is the \(l\)th draw of chain.
More details please refer to the paper in references