numeric vector.
NAs
and
Infs are allowed but will be removed.
OPTIONAL ARGUMENTS:
data.x
a
data.frame in which to interpret the variable named in
x. If this is missing, then
x must be a vector.
alternative
character string which specifies the alternative hypothesis.
For the one-sample KS-test,
alternative can be one of
"greater",
"less" or
"two.sided".
Two exceptions are the normal and exponential distributions
when the parameters are estimated.
In this case, only the
"two.sided" alternative is tested.
alternative refers to the relation between
the empirical distribution function of
x
and the hypothesized distribution.
Usually, you must supply the parameters of the hypothesized distribution.
The only exceptions are parameters for the normal and
exponential distributions.
distribution
character string that specifies the hypothesized
distribution in the one sample test.
For the two sample test, i.e. when
y is specified,
this argument is ignored.
Possible values are:
normal,
beta,
cauchy,
chisquare,
exponential,
f,
gamma,
lognormal,
logistic,
t,
uniform,
weibull,
binomial,
geometric,
hypergeometric,
negbinomial,
poisson.
print.object.p
if
TRUE, the result of the test is printed.
df1
parameter of a distribution, when
distribution is
"chisquare",
"f", or
"t".
df2
parameter of a distribution, when
distribution is
"f".
max
parameter of a distribution, when
distribution is
"uniform".
min
parameter of a distribution, when
distribution is
"uniform".
mean
parameter of a distribution, when
distribution is
"exponential",
"lognormal",
"normal",
"poisson".
sd
parameter of a distribution, when
distribution is
"normal",
"lognormal".
location
parameter of a distribution, when
distribution is
"cauchy",
"logistic".
scale
parameter of a distribution, when
distribution is
"cauchy",
"logistic",
"weibull".
shape1
parameter of a distribution, when
distribution is
"beta",
"gamma",
"weibull".
shape2
parameter of a distribution, when
distribution is
"beta".
prob
parameter of a distribution, when
distribution is
"binomial",
"geometric",
"negbinomial".
size
parameter of a distribution, when
distribution is
"binomial",
"negbinomial".
k
parameter of a distribution, when
distribution is
"negbinomial".
m
parameter of a distribution, when
distribution is
"hypergeometric".
n
parameter of a distribution, when
distribution is
"hypergeometric".
VALUE:
a list of class
"htest".
See the help file for
ks.gof for details.