I have a qqnorm plot of a data set with 1000+ points. I want to draw a line between two quantiles at a time (say 30% and 70%) just as qqline does with 25% and 75%, but with
EDIT:
The information below is valid for R (and stats
package) version 2.15.1 - apparently later versions will incorporate the built-in capability of plotting arbitrary quantiles.
qqline
seems to be hard-coded to plot the .25 and .75 quantiles. But if you don't mind creating your own function, something like this might do:
myQqplot <- function(data, probs){
qqnorm(data)
theQuants <- quantile(data, probs = probs)
lm1 <- lm(theQuants~qnorm(probs))
abline(lm1)
invisible()
}
myQqplot(diffbp, c(.5,.99))
There's no check to make sure that you supply only two quantiles to the probs
argument, but you could add it if you want.