I'm having some problems with the residual diagnostics of my multilevel model in Stata (using mixed). I've read all the previous threads on that topic here on Statalist but I'm still not sure whether I'm doing it correctly.
The main assumptions to check after running a mixed model (with my model being a random-intercept model with two levels, employees nested within firms) in my opinion are the normality of level-1 and level-2 residuals and homoscedasticity of level-1 residuals. I do have some questions regarding independence of level-1 and level-2 residuals, multicollinearity and linearity between predictors and the dependent variable as well.
I'd be more than thankful if you could tell me whether my approach would yield the results I'm looking for.
Code:
mixed ... predict res, residuals predict rstand, rstandard predict rfit, fitted predict res2, reffects
Code:
//normality of level-1 residuals histogram rstand, normal qnorm rstand pnorm rstand //normality of level-2 residuals histogram res2, normal qnorm res2 pnorm res2
Code:
//homoscedastictiy of level-1 residuals twoway(scatter rstand rfit), yline(0)
Code:
twoway(scatter res rfit), yline(0)
Independence of level-1 residuals and level-2 residuals
I've also read that level-1 residuals and level-2 residuals are supposed to be independent of each other. Would it be enough to check the correlation between them using the following code?:
Code:
pwcorr res res2
I'm testing for multicollinearity using
Code:
estat vif
Linearity between the dependent variable and independent variables
I'm checking the linearity between the dependent variable and each of the independent variables (main predictors and control variables) using the following code:
Code:
acprplot depvar indepvar, lowess lsopts(bdwith(1))
Thank you so much in advance, your input will be greatly appreciated!
Felicia
0 Response to residual diagnostics using mixed
Post a Comment