home *** CD-ROM | disk | FTP | other *** search
-
- _K_o_l_m_o_g_o_r_o_v-_S_m_i_r_n_o_v _T_e_s_t_s
-
- ks.test(x, y, ..., alternative = "two.sided")
-
- _A_r_g_u_m_e_n_t_s:
-
- x : a numeric vector of data values.
-
- y : either a numeric vector of data values, or a
- character string naming a distribution func-
- tion.
-
- ... : parameters of the distribution specified by
- y.
-
- alternative : indicates the alternative hypothesis and must
- be one of "two.sided", "greater" or "less".
- You can specify just the initial letter.
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- ks.test performs one or two sample Kolmogorov-Smirnov
- tests.
-
- If y is numeric, a two sample test of the null that x
- and y were drawn from the same distribution is per-
- formed.
-
- Alternatively, y can be a character string naming a
- distribution function. In this case, a one sample test
- of the null that the distribution function underlying x
- is y with parameters specified by ... is carried out.
-
- _V_a_l_u_e_s:
-
- A list with class "htest" containing the following com-
- ponents:
-
- statistic : the value of the test statistic.
-
- p.value : the p-value of the test.
-
- alternative : a character string describing the alternative
- hypothesis.
-
- method : a character string indicating what type of test
- was performed.
-
- data.name : a character string giving the name(s) of the
- data.
-
- _E_x_a_m_p_l_e_s:
-
- x <- rnorm(50)
- y <- runif(30)
- # Do x and y come from the same distribution?
- ks.test(x, y)
- # Does x come from a gamma distribution with shape 3 and scale 2?
- ks.test(x, "pgamma", 3, 2)
-
-