mod2 <- lm(Sepal.Width ~ ns(Petal.Width, df = 2) + Species, data = iris)