First time asking here in CV. I'm trying to perform an adjusted linear regression with a 3-knot restricted cubic spline on R. The 3-knots are explicitly specified based on literature/discussions. A sample code is below:
model.temp <- lm(outc~rcs(exp,knots=c(10,22,48))+age+sex+ethn+dev+com+tbf,data=master)
As many of you are familiar with, the resulting "summary(model.temp)" will show a Coefficients table with all the variables, it's Estimates, Std. Error, t, value, and Pr(>|t|).
Mock results for the first 5 estimates (excluding Intercept) are shown below :
Coefficients // Estimate // P-value
(Intercept)
rcs(exp, knots = c(10, 22, 48))exp // est:0.22 // p=0.04
rcs(exp, knots = c(10, 22, 48))exp' // est:-3.24 // p=0.23
rcs(exp, knots = c(10, 22, 48))exp'' // est:6.95 // p=0.02
rcs(exp, knots = c(10, 22, 48))exp''' // est:-4.13 // p=0.55
My question is, are these estimates representative of the range of exp between each knots?
What I would like to know is the effect/estimates of my exposure "exp" on my outcome "outc" when "exp" is: 0-10, 10-22, 22-48, 48+
In other words, are these ^ the estimates shown on my results, or are they the estimates only at those exact points/knots of "exp" i.e. :
- rcs(exp, knots = c(10, 22, 48))exp = estimate when model is linear (w/o spline/knots?)
- rcs(exp, knots = c(10, 22, 48))exp' = model estimate at exp=10
- rcs(exp, knots = c(10, 22, 48))exp' = model estimate at exp=22
- rcs(exp, knots = c(10, 22, 48))exp' = model estimate at exp=48
If so, how would I go about showing the estimates across those ranges of "exp" stated above: when "exp" is: 0-10, 10-22, 22-48, 48+ ?
Any help would be appreciated!