# LMM with standardized predictor - how to retrieve intercept & slope in the original scale

I fitted a LMM with random intercept and random slope by means of lmer():

model <- lmer(y ~ x + (1+x|subject),df)

However, lmer() returned an error:

   Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
Model failed to converge with max|grad| = 0.037749 (tol = 0.002, component 1)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?;Model is nearly unidentifiable: large eigenvalue ratio
- Rescale variables?


Therefore, I standardized the predictor by centering and dividing by the SD:

x <- (x-mean(x)/sd(x))


This made the model work. But now the intercept and slope for predictions do not represent the original scale anymore. But this was actually my reason for fitting the model: providing a formula to predict future observations.

I retrieved the original slope by dividing the slope by the sd(predictor)

mean(coef(model)[[c(1,2)]])/sd(x)


But I cannot retrieve the intercept anymore. As far as I understood, the intercept is now the value of y at the mean slope value, expressed in SDs:

mean(coef(model)[[c(1,1)]])


I would like to have the intercept in the classical meaning, i.e. the value of y when x = 0. Is it possible to retrieve this from the model?

You have a model of the form $$y = a + b\left( {\frac{{x - {\mu _x}}}{{{\sigma _x}}}} \right)$$ And need the parameters of this equivalent model $$y = c + dx$$
($\mu_x$ and $\sigma_x$ are the mean and the standard deviation of $x$.)
The two models are equivalent by definition, therefore it is easy to see that $$c = a - b\frac{{{\mu _x}}}{{{\sigma _x}}}$$ $$d = \frac{b}{{{\sigma _x}}}$$
• If model 1 and 2 have different random effect structures, their estimated parameters don't need to be equivalent. You can convert individual intercept, if you take subject-specific effects correctly into account. For model 2 for example, the intercept for subject $i$ is computed as $c_i = \left( {a + {u_{0i}}} \right) - \left( {b + {u_{1i}}} \right)\frac{{{\mu _x}}}{{{\sigma _x}}}$ where $u_{0i}$ and $u_{1i}$ are the subject-specific deviations from the mean intercept and slope, respectively (you can find them with the function ranef()) – matteo Jan 17 '18 at 16:27