Hello, I have a question about the variability of RCS coefficient estimates.
I’m working on a simulation study that involves RCS terms. I find that the RCS term coefficient estimates are highly variable. Is there a gain in efficiency in using the rcs() function (rms package in R) versus hand coding the RCS terms?
When I compare Wald tests using the rcs() function to hand-coded RCS terms, the test statistics are equal. I also find that the coefficient estimates are the same whether the RCS terms are hand coded, or the rcs() function with the Function() call is used. I think this means that there isn’t a gain in efficiency from using the rcs() function, but I’m wondering if there is a way to fit the data so that the estimates are less variable.
Is the correlation between the independent variable (e.g. X1) and the RCS terms derived from that variable (e.g. pmax(X1-knot1,0)^3, etc.) causing the issue with standard errors? Or is something else causing this?