I’ve developed a prediction model for a continuous outcome variable in R using quantile regression. When performing bootstrap validation using the validate.Rq function in Harrell’s rms package I get a slope and intercept of 1 and 0 suggesting appropriate calibration. However when I manually calculate the calibration slope by creating a linear model predicted ~ observed, the calibration slope is 2.
My quantile regression model is set to the median (tau=0.5).
Is there something unique about how calibration plots should be created in the setting of quantile regression. Certainly I like the slope of 1.0 that the validate.Rq function is outputting but I’m unable to demonstrate that visually so not sure if I’m misunderstanding this concept as it pertains to quantile regression.
I’ve also created a calibration plot with the x-axis representing predicted values and y-axs representing observed. The slope of 2 is more in keeping with the relationship I’m observing. However, validate.Rq function outputs a slope of 1 for both apparent validation and internal.
#**Code for internal validation: **
validate(quantile_model, B=500)
**#Manual calculation of calibration slope:**
predicted <- predict.rq(quantile_model, type="adjto")
lm(quartile_model, formula= Outcome ~ predicted)
#**Calibration plot (omitted further complexity for aesthetics):**
ggplot(df, aes(x=predicted, y=(outcome)))
prognosis modelling is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.