[R] KS test
Vaidotas Zemlys
mpiktas at gmail.com
Tue Sep 28 07:03:39 CEST 2004
Hi,
> 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...
>
>From examples in ks.test manual:
# Does x come from a shifted gamma distribution with shape 3 and scale 2?
ks.test(x+2, "pgamma", 3, 2) # two-sided
ks.test(x+2, "pgamma", 3, 2, alternative = "gr")
So you can be sure, that it will be "pnorm" for normal distribution.
Vaidotas
More information about the R-help
mailing list