Export fitted regression splines (constructed by 'bs' or 'ns') as piecewise polynomials
问题 Take for instance the following one-knot, degree two, spline: library(splines) library(ISLR) fit.spline <- lm(wage~bs(age, knots=c(42), degree=2), data=Wage) summary(fit.spline) I see estimates that I don't expect. Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 57.349 3.950 14.518 < 2e-16 *** bs(age, knots = c(42), degree = 2)1 59.511 5.786 10.285 < 2e-16 *** bs(age, knots = c(42), degree = 2)2 65.722 4.076 16.122 < 2e-16 *** bs(age, knots = c(42), degree = 2)3 37.170 9.722 3