# Dealing with heteroscedasticity and non-normality in a mixed model

I am trying to fit a mixed model (person as random effect) on data which has heteroscedasticity and non-normality. I log-transformed the Y-variable but it did not fix the problem. Normality and heterogeneity test and residuals plot with Y and log(Y) transformations are shown below. I will be grateful for any comments:

Shapiro-Wilk normality test

data:  resid
W = 0.4458, p-value < 2.2e-16

Bartlett test of homogeneity of variances

data:  resid and test\$person
Bartlett's K-squared = 442.58, df = 8, p-value < 2.2e-16


Model Y not transformed:

Model Y log transformed:

EDIT

Here I add more information, I measure time of reaction (seconds) for 9 persons in differents variables (some dummys other continous), below show table of model, variance (residiual and intercept) and plot residuals for each person

> person = pdLogChol(1)
Variance   StdDev
(Intercept) 0.03864167 0.1965749
Residual    3.64527198 1.9092595


I think that variance intercept its so low and residual variance so high, the person dont give variance in my results??. This is some results from my mixed model:

                         Value  Std.Error   DF   t-value p-value
(Intercept)        0.5962784 0.12821014 2334  4.650789  0.0000
dummy21           -0.8913013 0.24000557 2334 -3.713669  0.0002
countback2        -0.0322950 0.00923287 2334 -3.497829  0.0005
countspace2        0.8046936 0.18837571 2334  4.271748  0.0000
action             0.0001028 0.00001484 2334  6.926781  0.0000
pauseTime          0.0003853 0.00002582 2334 14.923275  0.0000
Duration           0.0007586 0.00003112 2334 24.377110  0.0000
Time2              0.0006724 0.00023442 2334  2.868323  0.0042


Below I show residual normalised from model por each person

• Could you provide more context? Namely, what is your outcome variable, e.g., is it only positive, does it have bounds, is it perhaps discrete, and what is the model you’re fitting. – Dimitris Rizopoulos Apr 20 at 4:03
• Why not use a nonlinear multilevel model? – Peter Flom Apr 20 at 10:34