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

Hedyeh Ahmadi hedyeh@h @end|ng |rom u@c@edu
Sat May 22 05:32:45 CEST 2021


Just a clarification, when I say "third degree polynomial" I mean, it generates a basis matrix for representing the family of piecewise-cubic splines with the specified sequence of interior knots, and the natural boundary conditions.

Best,

Hedyeh Ahmadi, Ph.D.
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

LinkedIn
www.linkedin.com/in/hedyeh-ahmadi<http://www.linkedin.com/in/hedyeh-ahmadi>


________________________________
From: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> on behalf of Hedyeh Ahmadi <hedyehah using usc.edu>
Sent: Friday, May 21, 2021 7:47:48 PM
To: r-sig-mixed-models using r-project.org <r-sig-mixed-models using r-project.org>
Subject: [R-sig-ME] Natural spline (i.e. ns() ) with glmer()/lmer()

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)?

Best,

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

LinkedIn
https://urldefense.com/v3/__http://www.linkedin.com/in/hedyeh-ahmadi__;!!LIr3w8kk_Xxm!6PUpiQYPrgA3Fbz27Esf9awfY2HmnPLrPbPDJqoI4oUYiCY8mKXv0w7CCGwAYgU$ <https://urldefense.com/v3/__http://www.linkedin.com/in/hedyeh-ahmadi__;!!LIr3w8kk_Xxm!6PUpiQYPrgA3Fbz27Esf9awfY2HmnPLrPbPDJqoI4oUYiCY8mKXv0w7CCGwAYgU$ >


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models__;!!LIr3w8kk_Xxm!6PUpiQYPrgA3Fbz27Esf9awfY2HmnPLrPbPDJqoI4oUYiCY8mKXv0w7CEqjBXMs$

	[[alternative HTML version deleted]]



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