I am trying to incorporate spline transformation into my logistic regression and finally piece together the following (working) R code (pls see it below). However, I have no idea how to interpret this summary. My outcome is a binary variable (disease; yes/no) and my predictor is a spline-transformed continuous variable (percentage).
Can someone please walk me through the output below in detail (what are low, high, diff, effect)? Which one is my odds ratio?
Also, what does the number "4" do? I tried to change it to other numbers like 5 or 6 but the output stays the same.
fit <- lrm(formula = disease ~ rcs(percentage, 4), data = final)
summary (fit)
Effects Response : disease
Factor Low High Diff. Effect S.E. Lower 0.95 Upper 0.95
percentage 15.3 38 22.7 -0.29743 0.77288 -1.81220 1.2174
Odds Ratio 15.3 38 22.7 0.74273 NA 0.16329 3.3784
Here is my data:
structure(list(percentage = c(5.5, 72.1, 7.9, 80.6, 56.3, 11.5,
15.3, 12.3, 30.9, 27.5, 0.3, 5.3, 19.6, 19.8, 0.3, 40.5, 16.8,
38, 13.8, 29.9, 15.8, 15.3, 22.8, 17.2, 41.2, 17.2, 31.6, 41.2,
19.6, 38, 41.2, 29.9, 15.3, 29.9, 38, 30.9, 31.6, 15.3, 15.3,
38, 31.6, 41.3, 21.4, 0.4, 41.2, 7.6, 29.9),
disease = structure(c(1L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L,
1L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L,
2L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L,
2L), .Label = c("none", "disease"), class = "factor")), row.names = c(NA,
-47L), class = "data.frame")