Dear all,
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.
Normality
Homoscedasticity
or is it supposed to be
And regarding homoscedasticity, what would some kind of rhombus-shaped graph imply? It's not fan-shaped (which would indicate heteroscedasticity) but the variance is still not the same at all points along the yline.
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?:
Multicollinearity
I'm testing for multicollinearity using
after regress, is that even correct considering the fact that the variance inflation factor relies on the R-squared which is not really interpretable in multilevel modeling? Are there any other methods except for checking the correlations between the independent variables?
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:
Or do I only have to check the linearity between my main predictors and the dependent variable?
Thank you so much in advance, your input will be greatly appreciated!
Felicia
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
Comment