Generates a quantile–quantile (QQ) plot comparing the empirical conditional CDF values from a fitted SPQRx model to the theoretical Uniform(0,1) distribution. If the model is well-calibrated, the points should lie approximately along the 45-degree line.
Details
The function computes conditional CDF values using
predict_spqrx(..., type = "CDF") and compares the sorted
empirical CDF values against theoretical Uniform(0,1) quantiles.
This diagnostic assesses overall distributional calibration. Deviations from the 45-degree line indicate model misspecification or poor fit in certain regions of the conditional distribution.
Examples
if (FALSE) { # \dontrun{
fit <- spqrx(...)
p <- eval.plot.qqplot(fit, x_test, y_test)
print(p)
} # }
