

是做的R语言nomgram校准取消,不知道为啥只有两个点,一个线
fit1 <- lrm(formula1, data = mydata, x=TRUE,y=TRUE)
cal1 <- calibrate(fit1, method = "boot", B=1000)
plot(cal1,
xlim = c(0,1),
xlab = "Predicted Probability",
ylab = "Observed Probability",
legend = FALSE,
subtitles = FALSE)
abline(0,1,col = "black",lty = 2,lwd = 2)
lines(cal1[,c("predy","calibrated.orig")], type = "l",lwd = 2,col="red",pch =16)
lines(cal1[,c("predy","calibrated.corrected")], type = "l",lwd = 2,col="green",pch =16)
legend(0.55,0.35,
c("Apparent","Ideal","Bias-corrected"),
lty = c(2,1,1),
lwd = c(2,1,1),
col = c("black","red","green"),
bty = "n") # "o"为加边框

能让我的图类似这样吗