s-news
[Top] [All Lists]

Re: ks.gof bug?

To: "Kurbat, Matt" <Matt.Kurbat@kmv.com>
Subject: Re: ks.gof bug?
From: "David M Smith" <dsmith@insightful.com>
Date: Thu, 22 Mar 2001 10:39:41 -0800
Cc: <s-news@lists.biostat.wustl.edu>
Importance: Normal
In-reply-to: <4495FF893208D411ABEB00508BCA32BBDF1C23@ntserver2.kmv.com>
This is a bug in S-PLUS 2000 that has been fixed in S-PLUS 6.  The correct
result, in the released version of S-PLUS 6 for Unix and the Beta version of
S-PLUS 6 for Windows, is:

> ks.gof(x, distribution = "uniform", alternative = "two.sided",
        min = 0, max = 1)

        One-sample Kolmogorov-Smirnov Test
        Hypothesized distribution = uniform

data:  x
ks = 0.18, p-value = 0.0688
alternative hypothesis:
  True cdf is not the uniform distn. with the specified parameters

Depending on the precision of your data, the workaround of using
ks.gof(x+1e-6, ...) as suggested by Joseph Lucke may be suitable (in this
particular case, it gives the same p-value to 4 dp).

# David

--
David M Smith <dsmith@insightful.com>
S-PLUS Product Marketing Manager, Insightful Corp, Seattle WA
Tel: +1 (206) 283 8802 x360
Fax: +1 (206) 283 0347

MathSoft is now Insightful!  See www.insightful.com for details.

> -----Original Message-----
> From: s-news-owner@lists.biostat.wustl.edu
> [mailto:s-news-owner@lists.biostat.wustl.edu]On Behalf Of Kurbat, Matt
> Sent: Wednesday, March 21, 2001 11:57
> To: 's-news@lists.biostat.wustl.edu'
> Cc: Kurbat, Matt
> Subject: FW: [S] ks.gof bug?
>
>
>
> Dear Splus Users,
>
> I have found what may be a bug in ks.gof.
> I've replicated several times and gotten the same result each time.
> My parameters: windows NT, Splus 2000.
>
>
>
>       I try to do the following:
>
> x<- c( 0.46, 0.08, 0.47, 0.14, 0.35, 0.61, 0.42, 0.13, 0.62, 0.44, 0.66,
> 0.13, 0.04, 0.17, 0.13,
> 0.43, 0.02, 0.22, 0.13, 0.27, 0.13, 0.45, 0.41, 0.46, 0.48, 0.83, 0.67,
> 0.97, 0.37, 0.96,
> 0.40, 0.33, 0.76, 0.67, 0.31, 0.93, 0.69, 0.65, 0.03, 0.58, 0.07, 0.14,
> 0.28, 0.32, 0.76,
> 0.47, 0.65, 0.54, 0.41, 0.89)
>
> ks.gof(x,distribution="uniform",alternative = "two.sided", min=0,max=1)
>
>
>
>       What happens is the following:
>
> Splus.exe - Application Error
>
> The instruction at "0x02cc02e2" referenced memory at
> "0x03408000".  The memory  could not be "written".
>
> Click on OK to terminate the application.
> Click on CANCEL to debug the application.
>
> When I click "CANCEL", Visual C++ is launched
> and the following is highlighted:
>
> "02CC02E2   mov         dword ptr [eax*8+305ABB8h],edx"
>
>
>
>
> Does anyone know what is going on, and maybe how to circumvent it?
>
>
> Thank you,
> Matt
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
>


<Prev in Thread] Current Thread [Next in Thread>