On Tue, 26 Oct 2004, Phineas Campbell wrote:

> I am trying to return the p value for a stat from the ECDF.  That is the
> index of the first occurrence,
> on an ordered vector, of a value either greater than or equal to a given
> value.

That's called a *quantile*, probably type=1 in the Hyndman-Fan 
classification, if the `ordered vector' is the ECDF x-values.

> Ideally I would not have to order the vector beforehand.

You could use sort(partial=something), though, as quantile does.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to