My situation right now is that I have the mixed model with quadratic term but it doesn't perform very well. So I am wondering if I can apply loess or spline regression to the mixed model instead of the quadratic term. I just want to see the different.

P.s. this is what my code looks like: Model response = age age^2; Random intercept age age^2;


1 Answer 1


What you are describing sounds like a Semiparametric Nonlinear Mixed Effects model. The model would be:

$y_i = b_i + f(age_i) + e_i$ where $b_i \sim N(0,\sigma_b^2)$, $e_i \sim N(0,R_i)$ for some covariance matrix $R_i$, and $f(age)$ is an unknown function that is estimated via a B-spline.

It is possible to fit such a model within the nlme package in R. One relevant reference for this would be:

Elmi, Ratcliffe, Parry, and Guo (2011), A B-spline Based Semiparametric Nonlinear Mixed Effects Model, Journal of Computational and Graphical Statistics.

  • $\begingroup$ yi=bi+f(agei)+ei where bi∼N(0,σ2b), ei∼N(0,Ri), isn't that the same as non-linear model? What is the difference between Semiparametric Nonlinear M-E Model and Non-Linear M-E Model? $\endgroup$
    – Phume
    Commented Apr 11, 2015 at 3:51
  • $\begingroup$ Since $f(age)$ is unknown, it is estimated using some nonparametric technique. In the NLME model, we assume $f(age)$ is a parametric function. $\endgroup$
    – aphe
    Commented Apr 11, 2015 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.