# Random Effects Model From Scratch

Random Effects Model by Hand I use random effects models (aka mixed-effects models aka multi-level models aka hierarchical linear models) frequently in my research. Although I understood the intuition behind them for a long time, I was lost on the mechanics, so I decided to finally sit down and try to code one from scratch. The random effects model is given by the equation:
\(y_i = X_i\alpha + Z_ib_i + e_i\)