Ken Koon Wong rewrites a package:
We used mulitple imputation by chained equations (MICE) quite often in imputing missing data in many occasion, but I never really understood the mechanism behind it except that it appears magical! š§ I want to see if I can build this from scratch as a mean to understand the foundation of MICE so that at least it will give me the illusion of understanding. 𤣠Join me in my messy journey of trying to code it from the ground up (FYI, Iām not coding OLS or MLE from the ground upā¦), and letās see if we can create some āmagicā here! This is going to be a bumpy one with lots of coding, and maybe less of mathematical formulae. Iāll try my best to provide a TL;DR for each section so that we can get a high level view as well. Buckle up! And oh, Happy Halloween! š What a better time to look at magical recipes of statistics! Letās go!
I really like this post. The end result isn’t exactly what the mice implementation gives, but it’s close enough to show real understanding of the algorithm. H/T R-Bloggers.