Description Usage Arguments Details Value Author(s) See Also Examples
Compute the Kolmogorov statistic and its one-sided variants.
1 2 |
x |
numeric; the data vector |
cdf |
a character string naming a cumulative distribution function or an actual cumulative distribution function such as 'pnorm'. |
type |
specifies the required variant of the statistic and must
be one of '" |
ties.jitter |
processing of ties: if NULL (default) no check
for ties is done, if TRUE a default jitter is applied to tied values,
a numeric value, say |
... |
parameters of the distribution function specified by
|
The same result may be obtained by extracting the statistic
component from the result of ks.test
, see the examples.
psi.Dn
may be convenient for use as part of other calculations
since it only computes D.
When there are ties in the data and ties.jitter
is not NULL the
returned value is random and will vary even if the function is
called with the same data.
the value of the requested statistic, a single number.
Georgi N. Boshnakov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | a1 <- rnorm(10) # some data
psi.Dn(a1,cdf=pnorm) # Compute Dn
ks.test(a1,pnorm)$statistic # should be the same
psi.Dn(a1,cdf=pnorm,type="D^+")
ks.test(a1,pnorm,alternative="greater")$statistic
psi.Dn(a1,cdf=pnorm,type="D^-")
ks.test(a1,pnorm,alternative="less")$statistic
psi.Dn(a1,cdf=pnorm,mean=2,sd=2.3) # pnorm with parameters.
a2 <- rexp(10,rate=0.1) # exponential dist
psi.Dn(a1,cdf=pexp)
psi.Dn(a1,cdf=pexp,rate=0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.