pzivich / Delicatessen

Delicatessen: the Python one-stop sandwich (variance) shop 🥪
https://deli.readthedocs.io/en/latest/index.html
MIT License
22 stars 2 forks source link

Error in robust mean estimating equation [BUG] #15

Closed pzivich closed 2 years ago

pzivich commented 2 years ago

Expected behavior The robust mean estimating equation is incorrect.

Describe the bug The np.clip utility occurs at the wrong place. The clip is called before the subtraction (not after). This is generally okay when mu=0 but not for more general cases. This problem only affects ee_mean_robust (i.e., it does not occur for ee_robust_regression.

Relevant error output N/A

Versions:

pzivich commented 2 years ago

Note: the documentation for this functions is correct. However, the formula does not correspond to the actual Huber's robust mean. I am transitioning over to Huber's definition of the robust mean