[R-sig-ME] Natural spline (i.e. ns() ) with glmer()/lmer()

Hedyeh Ahmadi hedyeh@h @end|ng |rom u@c@edu
Sat May 22 04:47:48 CEST 2021

Hello All,

I would like to double check my understanding with the followings:

1 - In a linear mixed model if I use ns() for a continuous variable with for example one knot then I'll have two pieces of natural splines (i.e. third degree polynomial) one before the knot and one after the knot.

2 - But if I run the same ns() in a linear mixed model without any knots, does that mean I am fitting one 3rd degree polynomial between the boundaries (i.e. over the range of my continuous variable)?


Hedyeh Ahmadi, Ph.D.
Applied Statistician
Keck School of Medicine
Department of Preventive Medicine
University of Southern California

Postdoctoral Scholar
Institute for Interdisciplinary Salivary Bioscience Research (IISBR)
University of California, Irvine


	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list