Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out.threshold not used #9

Open
ncooder opened this issue Jan 27, 2025 · 3 comments
Open

out.threshold not used #9

ncooder opened this issue Jan 27, 2025 · 3 comments

Comments

@ncooder
Copy link

ncooder commented Jan 27, 2025

I think that in this place, even though the out.tolerance is assigned:

if(min(Tt)<out.tolerance){

The out.threshold in the IDE looks like it is never used. Can you simply pass in the find_outliers out.threshold as an argument?

@timginker
Copy link
Owner

This is a straightforward application of the standard algorithm for outlier detection. There may be situations where backward deletion is necessary. For more details, see Findley, D.F., Monsell, B.C., Bell, W.R., Otto, M.C., and Chen, B.C. (1998). "New capabilities and methods of the X-12-ARIMA seasonal-adjustment program." Journal of Business & Economic Statistics, 16(2), pp. 127-152.

@ncooder
Copy link
Author

ncooder commented Jan 28, 2025

@timginker I see, but since you are passing out.tolerance=out.threshold what is the difference then for find_outliers?

@timginker
Copy link
Owner

Oh, I think I understand. It's just a matter of unsuccessful naming, I guess. Initially, I called it out.tolerance and then changed it to out.threshold. So, it's the same argument.

The method starts by checking each observation for being an outlier and adding it if necessary (forward addition step). Then we proceed to backward deletion, because after more outliers are added, some that initially were significant may not be anymore, and they are deleted starting from the least significant. I assume that if there are just a few outliers, the backward deletion makes no change to the initial list of outliers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants