# Is it possible to model a continuous variable using a linear spline with one knot located at two different place according to a categorical variable?

I’m trying to understand what there is behind an equations currently used to estimate glomerular filtration rate (GFR). This equation was derived using linear regression where ln(GFR) was modelled according to ln(creatinine), age (on natural scale), and sex. Here the main paper.

This is what the authors claim in the supplementary appendix As we have previously described, CKD-EPI equations are modeled using least squares linear regression to relate log transformed measured GFR to log-transformed filtration markers, age, and sex with two slope splines for creatinine. The splines are two phase linear splines on the log scale. For creatinine, the knot is at 0.7 mg/dl for women and 0.9 mg/dl for men

This is how they report the equation in the general form (natural scale)

My main questions are :

• How did the authors end up with knot located at two different points using the same dataset (0.7 and 0.9 for female and male, respectively)? Does this imply that they fitted the model separately for the two subgroups?

• In their equation, min(Scr/k,1)^α * max(Scr/k,1)^-1.209 is the term used to express the effect of creatinine. The left part is 1 when cr is above the knot and the right part is 1 when cr is below the knot. But if my understanding of linear spline is right, this is not how they are supposed to work (the first term should not be “null” when the variable is above the knot and viceversa).

Thank you very much.

@Peter Flom Here is how the Scr term of the equation looks like formatted with latex on natural scale $$\min\left(\frac{Scr}{k}, 1\right)^{\alpha} \cdot \max\left(\frac{Scr}{k}, 1\right)^{-1.209}$$ And this is the term on log scale which is the scale used to fit the model

$$0.241 \cdot \min(\log(\text{cr}) - \log(k), 0) - 1.2 \cdot \max(\log(\text{cr}) - \log(k), 0)$$

I've just realised that this is a perfectly fine way to explicitly report linear spline terms (I was used to writing it down in a different way and I got confused). Yet, I definitely can't understand how they derived the spline locating the knot at two different place (0.7 for female, and 0.9 for male). You can introduce an interaction term between Cr and Sex but you should derive a sex specific slope but the turning point (knot) should be the same. Any though about that?

Thanks, your help is very much appreciated

• What do you mean by "null" in your second question? (Also, you can use LaTeX to format your equations; that will make them easier to read). Mar 9 at 18:19

## 1 Answer

For your first question, I can't tell, from what you quoted, what they did. They certainly could have fit the splines separated for men and women, or they could have used an interaction of sex and the spline.

For your second question, see my comment.

• Thanks for your reply. I can't imagine a different way other than fitting the model separately for male and female (which doesn't sound an appropriate approach to me). I've also tried to explain this as interaction factor between Scr and sex but in that case, I would end up with a different slope for male and female, not with a knot located to a different point. Am I wrong? Mar 9 at 18:34
• I think you may be correct, but I am not positive. Mar 9 at 20:10
• Sorry, what do you mean with "I am not positive"? Mar 9 at 20:21
• I mean that I am not certain. I might be wrong. Mar 9 at 20:36