Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you add a multilevel structure to shrink your (generalized) linear predictors, this framework becomes incredibly powerful.

There are entire statistics textbooks devoted to multilevel linear models, you can get really far with these.

Shrinking through information sharing is really important to avoid overly optimistic predictions in the case of little data.



If you like shrinkage (I do), I highly recommend the work of Matthew Stephens, e.g. ashr [1] and vash [2] for shrinkage based on an empirically derived prior.

[1] https://cran.r-project.org/web/packages/ashr/index.html [2] https://github.com/mengyin/vashr


Yes, the article linked to ashr is quite famous.


Especially when you use the mixed model (aka MLM) framework to automatically select the smoothing penalty for your splines. So in one simple and very intuitive framework, you can estimate linear and nonlinear effects, account for repeated measurements and nested data, and model binary, count, or continuous outcomes (and more), all fitting the model in one shot, yielding statistically valid confidence intervals and p-values.

R's mgcv package (which does all of the above) is probably the single reason I'm still using R as my primary stats language.


Is there a Python eqivalent?


statsmodels is the closest thing in python to R. statsmodels has mixed model support, but mgcv apparently requires more. It is well above my paygrade, but this seems relevant: https://github.com/statsmodels/statsmodels/issues/8029 (i.e. no out of the box support, you might be able to build an approximation on your own).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: