In reply to M balafrej.

I wouldn't. One way to define an outlier in a regression model is to look at the residuals. An outlier is an observation whose absolute residual value is larger than expected. In this definition, the outlier depends on the model. So I wouldn't use Hampel's "running median" model to identify outliers for a completely different model.