3

I am working on some B-spline regression (first degree, single knot, not very complicated) and would like to compare the parameter estimates for the portion before and the portion after the internal knot.

Right now I have something like this:

fit <- lm(y ~ bs(x, degree = 1, knots = 20), data = bar)

The fit then has the intercept estimate and two sets of parameter estimates.

I am interested in comparing those two parameter sets against one an other - does anyone know to divide the bs model object or extract those two sub-models? Or, convert an F value to a p value in R so I can do those tests manually.

Zheyuan Li
  • 71,365
  • 17
  • 180
  • 248
iacobus
  • 587
  • 3
  • 10

0 Answers0