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 / base / chisquare.test < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.3 KB  |  35 lines

  1.     
  2.     _C_h_i-_S_q_u_a_r_e _T_e_s_t
  3.     
  4.          chisquare.test(x, y=NULL, correct=T,
  5.                  p=rep(1/length(x),length(x)))
  6.     
  7.     _D_e_s_c_r_i_p_t_i_o_n:
  8.     
  9.          This function performs a chisquare test on the con-
  10.          tingency table in the object x and returns the results
  11.          of the test.  If x is a vector or a matrix with one row
  12.          or column and y has no argument then the table is
  13.          assumed to be one-dimensional, and the chisquare test
  14.          for a specific set of population probabilities is per-
  15.          formed.  These are in the vector p, or, if p is miss-
  16.          ing, are assumed to be equal.  If x is a matrix with
  17.          two or more rows and two or more columns or x and y are
  18.          vectors or factors specifying a two-way contingency
  19.          table with two or more rows and two or more columns
  20.          then a chisquare test for independence or equal group
  21.          probabilities is performed.  If correct=TRUE then
  22.          Yates' continuity correction is applied to 2 by 2
  23.          tables.
  24.     
  25.     _V_a_l_u_e_s:
  26.     
  27.          The function prints out the result of the test and
  28.          returns a list containing the following elements:
  29.     
  30.         chi : the matrix containing the components of chi-
  31.               square.
  32.     
  33.           E : the matrix containing the expected values.
  34.     
  35.