Discussion:
[S] QQ plot x-axis values ['Watchdog': checked]
(too old to reply)
Paul Matthias Diderichsen
19 years ago
Permalink
Dear S-plus users again.
Of course, there's still one issue: There seems to be a discrepancy
between what wikipedia says and what S-plus does.
Apparently, S-plus selects the midpoint of n intervals between 0 and 1 for
it's horizontal values in qqmath. Of course, for n->infinity the sets used
by S-plus and wikipedia converge. But which one is "most right" for
finite/small n?

Thanks again, PMD.

============================================================================================================================
The information contained in this communication is confidential, may be subject to legal privileges, may constitute inside information, and is intended only for the use of the addressee. It is the property of Abbott Laboratories or its relevant affiliate. Unauthorized use, disclosure or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify Abbott Laboratories immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.
=============================================================================================================================
Li, Timothy - BLS
19 years ago
Permalink
S-plus appears to be using the formula (k-0.375)/(n+0.25) that is
advocated elsewhere on the internet. See
http://www.tau.ac.il/cc/pages/docs/sas8/stat/chap55/sect44.htm

and

http://www.okstate.edu/sas/v8/saspdf/qc/chap10.pdf#search=%22constructio
n%20of%20q-q%20plot%22

Tim

________________________________

From: s-news-***@lists.biostat.wustl.edu
[mailto:s-news-***@lists.biostat.wustl.edu] On Behalf Of Paul Matthias
Diderichsen
Sent: Tuesday, October 10, 2006 9:57 AM
To: Paul Matthias Diderichsen
Cc: s-***@lists.biostat.wustl.edu; s-news-***@lists.biostat.wustl.edu
Subject: Re: [S] QQ plot x-axis values ['Watchdog': checked]



Dear S-plus users again.
Of course, there's still one issue: There seems to be a discrepancy
between what wikipedia says and what S-plus does.
Apparently, S-plus selects the midpoint of n intervals between 0 and 1
for it's horizontal values in qqmath. Of course, for n->infinity the
sets used by S-plus and wikipedia converge. But which one is "most
right" for finite/small n?

Thanks again, PMD.
========================================================================
====================================================
The information contained in this communication is confidential, may be
subject to legal privileges, may constitute inside information, and is
intended only for the use of the addressee. It is the property of Abbott
Laboratories or its relevant affiliate. Unauthorized use, disclosure or
copying of this communication or any part thereof is strictly prohibited
and may be unlawful. If you have received this communication in error,
please notify Abbott Laboratories immediately by return e-mail and
destroy this communication and all copies thereof, including all
attachments.
========================================================================
=====================================================
Stephen Kaluzny
19 years ago
Permalink
...
By default, S-PLUS uses the f(i) = (i-0.5)/n formula. This is described
in Cleveland, W. (1993) Visualizing Data where it is noted that the
precise form of f(i) is not important for a quantile plot (it may make
a difference when n = 3 but you probably should not be looking at
a quantile plot with only three data points).

The probability values used in S-PLUS for qqmath and qqnorm are computed
from the ppoints function. The function has an optional argument a that
controls the precise values of f(i). The values returned are: (seq(n) -
a)/(n + 1 - 2*a). The default value of a=0.5 leads to the (i-0.5)/n
values. Setting a=0.375 leads to the formula noted by Timothy Li and
setting a=0 gives the results noted in Wikipedia.

The probability values used in the qqmath function are specified in the
f.value argument to qqmath. The default for f.value is ppoints. To
create a qqmath call using the Wikipedia probability values you
could do:

x <- rnorm(12)
myppoints <- function(n) ppoints(n, a=0)
qqmath(~ x, f.value=myppoints)

To use different probability values in qqnorm you need to define your
own ppoints with the appropriate default value of a that you want
since qqnorm.default calls ppoints using the default value of a.

-Stephen Kaluzny
Insightful Corp.
--------------------------------------------------------------------
This message was distributed by s-***@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-***@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news

Loading...