Subject: Suggestion for qqplot() improvement
From: Martin Maechler (email@example.com)
Date: Tue 31 Aug 1999 - 23:42:48 EST
>>>>> On Tue, 31 Aug 1999 14:57, Werner Stahel <firstname.lastname@example.org> said:
WSt> Here is a suggestion. It seems that qqplots, comparing a sample
WSt> to a distribution other than the normal, are not explicitly
WSt> available in S or R. I found
(in S-plus / Trellis it is, see below)
WSt> qqplot(y, rt(300, df = 5))
WSt> as an example in the help file to qqplot .
WSt> This is not very sensible.
(it only tried to show that you can QQ-plot two datasets
of *different* length, rather than anything else)
WSt> I would prefer
WSt> n <- length(y)
WSt> qqplot(qt((1:n)/(n+1), df=5), y, xlab='quantiles', ylab='data')
yes, for comparison with a theoretical distribution.
qqplot(qt(ppoints(n), df=5), y,
xlab='quantiles of t(* ,df=5)', ylab='data')
WSt> and this could be shortened to
WSt> qqplot(y, distribution='t', df=5)
WSt> with an easy extension of the function.
Trellis in S-plus has
qqmath(formula, distribution = qnorm, f.value = ppoints, ...),
for your example
qqmath( ~ y, distribution = function(p) qt(p, df=5), ...)
which is slightly more general (also works with panels, banking to 45
deg,..) but quite a bit more complicated to use for non-sophisticated users.
What should we do / would we want for R?
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: email@example.com
This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:07 EST