Thursday, March 29, 2018

Diagnostics After Multilevel Regression in Stata

Here are few diagnostics that can be run in Stata after running a multilevel model

1. Assess normality of residuals

predict resid_std, rstandard
qnorm resid_std
2. Examine relationship between predicted and residual values

predict resid, res
predict fit, fit

3. Examine variance-covariance matrix
estat recovariance
estat recovariance, correlation
4. Determine Cook’s D and DFBETAs using MLT module
net install mlt.pkg    /* Installs MLT package*/
mltcooksd /* reports Cook’s D of the whole model */
mltcooksd, fixed /* reports Cook’s D of the Fixed part */
mltcooksd, random /* reports Cook’s D of the Random part */
mltcooksd, approx /* Uses approximation and returns results faster */