wilson_hilferty(2056, df = 4)
wilson_hilferty(1831, df = 20)
set.seed(1144) # for reproducibility
x <- rchisq(1000, df = 10)
w <- sapply(x, FUN = function(x) wilson_hilferty(x, df = 10))
px <- pchisq(x, df = 10)
pw <- pchisq(round(w), df = 1)
plot(px, pw)
abline(0, 1, lty = 2, col = 2)
cor(px, pw)
Run the code above in your browser using DataLab