Relative Content

Tag Archive for rcomparelinear-regressionspline

How to test if change-point in b-spline is statistically significant?

I’m interested in testing if the difference between 2 slopes one either side of a knot is statistically significant. Ignoring the model assumption violations with this example, how would one see if there was a significant change in the relationship/slope between x and y in the plot below? I’ve never used linear regression with the b-spline command before, do the p-values signify this difference between the two lines? I’m using the data “mtcars” as a stand-in for my own data.