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

Smoothing approximations of `psi` #48

Open pzivich opened 4 months ago

pzivich commented 4 months ago

Is your feature request related to a problem? Please describe.

M-estimation has issues when the estimating functions are not smooth. The most obvious example is the percentiles. This issue comes up for the root-finding procedure (there are multiple valid solutions) and variance estimation (derivative is not defined at particular points). To get around these issues, it has been proposed to use some smoothing approximation. Coverage of this would expand possible use-cases.

Describe the solution you'd like

Not sure exactly. At the least, it would be good to have some examples on the website that showcase the smoothing approximation method. That would make it easier to adapt. I could also then remove some of the warnings in the documentations for the median or percentile built-in estimating equations.

More broadly, some smoothing functions that can be called from utils would be useful. However, I'm not sure if spline smoothing is fine in all cases. I need to consider this further.

Describe alternatives you've considered

Continue recommending against percentile functions and other highly non-smooth estimating equations. It isn't ideal, but it can be fine. For example, the robust mean does reduce the influence of outliers (so functions kind of like the median). But this doesn't naturally extend to percentiles.

Additional context

Shang, Z. (2010). Convergence rate and Bahadur type representation of general smoothing spline M-estimates.

Hampel, F., Hennig, C., & Ronchetti, E. (2011). A smoothing principle for the Huber and other location M-estimators. Computational Statistics & Data Analysis, 55(1), 324-337.

pzivich commented 4 months ago

Example here https://cran.r-project.org/web/packages/geex/vignettes/v01_additional_examples.html