Re: [R] function for the average or expected range?; CORECTION

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Fri, 21 Mar 2008 14:39:51 -0700

Hi, Greg:

      Thanks very much for the reply.

  1. The 'ptukey' and 'qtukey' function are the distribution of the studentized range, not the range. I tried "sum(ptukey(x, 2, df=Inf, lower=FALSE))*.1" and got 1.179 vs. 1.128 in the standard table of d2 for n = 2 observations per subgroup.
  2. I tried simulation and found that I needed 1e7 or 1e8 random normal deviates to get the accuracy of the published table.
  3. Then I programmed in Excel the integral over seq(-5, 5, .1) using a correction to the formula I got from Kendall and Stuart and got the exact numbers in the published table except in one case where it was off by 1 in the last significant digit.
      Thanks again,
      Spencer

Greg Snow wrote:
> The "ptukey" and "qtukey" functions may be what you want (or at least in
> the right direction).
>
> You could also easily estimate this by simulation.
>
> Hope this helps,
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 21 Mar 2008 - 21:45:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 22 Mar 2008 - 16:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive