home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / ctest / ks.test < prev    next >
Encoding:
Text File  |  1997-09-13  |  1.8 KB  |  62 lines

  1.     
  2.     _K_o_l_m_o_g_o_r_o_v-_S_m_i_r_n_o_v _T_e_s_t_s
  3.     
  4.          ks.test(x, y, ..., alternative = "two.sided")
  5.     
  6.     _A_r_g_u_m_e_n_t_s:
  7.     
  8.                x : a numeric vector of data values.
  9.     
  10.                y : either a numeric vector of data values, or a
  11.                    character string naming a distribution func-
  12.                    tion.
  13.     
  14.              ... : parameters of the distribution specified by
  15.                    y.
  16.     
  17.      alternative : indicates the alternative hypothesis and must
  18.                    be one of "two.sided", "greater" or "less".
  19.                    You can specify just the initial letter.
  20.     
  21.     _D_e_s_c_r_i_p_t_i_o_n:
  22.     
  23.          ks.test performs one or two sample Kolmogorov-Smirnov
  24.          tests.
  25.     
  26.          If y is numeric, a two sample test of the null that x
  27.          and y were drawn from the same distribution is per-
  28.          formed.
  29.     
  30.          Alternatively, y can be a character string naming a
  31.          distribution function.  In this case, a one sample test
  32.          of the null that the distribution function underlying x
  33.          is y with parameters specified by ... is carried out.
  34.     
  35.     _V_a_l_u_e_s:
  36.     
  37.          A list with class "htest" containing the following com-
  38.          ponents:
  39.     
  40.     statistic : the value of the test statistic.
  41.     
  42.     p.value : the p-value of the test.
  43.     
  44.     alternative : a character string describing the alternative
  45.               hypothesis.
  46.     
  47.      method : a character string indicating what type of test
  48.               was performed.
  49.     
  50.     data.name : a character string giving the name(s) of the
  51.               data.
  52.     
  53.     _E_x_a_m_p_l_e_s:
  54.     
  55.          x <- rnorm(50)
  56.          y <- runif(30)
  57.          # Do x and y come from the same distribution?
  58.          ks.test(x, y)
  59.          # Does x come from a gamma distribution with shape 3 and scale 2?
  60.          ks.test(x, "pgamma", 3, 2)
  61.     
  62.