[R] ks.test()

Prof Brian D Ripley ripley at stats.ox.ac.uk
Thu Aug 28 15:34:37 CEST 2003


On Thu, 28 Aug 2003, franck allaire wrote:

> With the Shifted Exponential test, H_0 is "data is a sample coming from a
> Shifted Exponential distribution with shift=30 and lambda = 0.001566907"

You got that after looking at the data.  H_0 has to be specified before
looking at the data.

> >You appear to be applying the KS test after estimating parameters.
>
> I do in order to define H_0 as explained above

That's invalid.

> >The distribution theory is for an iid sample from a known continuous
> >distribution (and does not otherwise depend on the distribution).
>
> That's what I thougth but this is not what I understand reading:

Learn not to believe everything you read on the Web.

> >Since your H_0 is not pre-specified, that distribution theory is not
> >correct.
>
> please see above

Rather, please take careful note yourself.

> >(Some corrections have been worked out for say ML fitting of exponential
> >and normal distributions -- by Michael Stephens as I recall.)
> >Also, your `truncated LogNormal' does not appear to be truncated, rather
> >to be shifted.  That's the same thing for an exponential (for a positive
> >shift), but not for any other distribution.
>
> Thanks for this clarification
>
> >And what is the H_0 and H_1 used in the article?
>
> H_1 is that the sample is not coming from the specified distribution in H_0

Not so: perhaps an iid sample from some other continuous distribution?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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




More information about the R-help mailing list