I just fitted the following linear mixed effects model:
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: price ~ variable + (1 | product)
Data: podzbior
AIC BIC logLik deviance df.resid
130840.14 130868.85 -65416.07 130832.14 9674
Scaled residuals:
Min 1Q Median 3Q Max
-6.2824 -0.3099 -0.0547 0.2201 12.4291
Random effects:
Groups Name Variance Std.Dev.
product (Intercept) 427375 653.7
Residual 25930 161.0
Number of obs: 9678, groups: product, 1222
Fixed effects:
Estimate Std. Error t value
(Intercept) 9.362e+02 1.899e+01 49.29
variable -7.521e-04 1.171e-04 -6.42
Correlation of Fixed Effects:
(Intr)
variable -0.050
That was output from summary(lmerModel)
, after the run of lmer
I got this warning:
Warning:
In checkScaleX(X, ctrl = control) :
Some predictor variables are on very different scales: consider rescaling
Q1 Predictor variable is numeric from 0 to something like 100k, how It should be scaled?
Random effects with confidence intervals chart for this model looks like this, is it OK?:
I am pretty sure residuals are not OK. What should I do in this case?
How can I go deeper with this model diagnostic, besides checking p-values?
variable
? Is is reasonable to take thesqrt
of it? Tolog
it? To do something likeI(variable/1e6)
maybe? Try to think easily interpretable transformations before doing something heavy-handed like a Box-Cox. $\endgroup$lqmm
androbustlmm
might can handy... $\endgroup$