[R] KS test
Vito Ricci
vito_ricci at yahoo.com
Mon Sep 27 16:47:14 CEST 2004
Dear Florence,
you should specify parameters of normal distribution
(mean and sd) see this example.
z<-rnorm(100,2,10)
ks.test(z,pnorm,2,10)
One-sample Kolmogorov-Smirnov test
data: z
D = 0.0508, p-value = 0.9585
alternative hypothesis: two.sided
best
Vito
You wrote:
Dear all,
I have a question about the ks.test() function, in
order to perform a
Kolmogorov-Smirnov test.
I think that my question is very simple for many of
you, but I cannot find
an answer right now...
I have a sample, and I want to test if its
distribution is normal. So I
would like to perform a one sample KS test but I
cannot find the "y"
argument representing the "character string naming a
distribution
function" according to the ?ks.test help page.
It is impossible forme to have a list of these
character strings naming a
distribution function.
I think it is "pnorm" for a normal distribution, bu I
would like to be sure...
Thanks a lot for your help,
Florence.
PS: I know that the KS test is not the best test for
normality, I also
performed the Shapiro-Wilk test.
Dear Florence,
you should specify parameters of normal distribution
(mean and sd) see this example.
x<-rnorm(100)
> ks.test(x,pnorm,0,1)
One-sample Kolmogorov-Smirnov test
data: x
D = 0.164, p-value = 0.009235
alternative hypothesis: two.sided
=====
Diventare costruttori di soluzioni
"The business of the statistician is to catalyze
the scientific learning process."
George E. P. Box
Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml
___________________________________
http://it.seriea.fantasysports.yahoo.com/
More information about the R-help
mailing list