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 / var < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.0 KB  |  40 lines

  1.     
  2.     _C_o_v_a_r_i_a_n_c_e _M_a_t_r_i_c_e_s
  3.     
  4.          var(x, y=x, na.rm=FALSE, pairwise=FALSE)
  5.     
  6.     _A_r_g_u_m_e_n_t_s:
  7.     
  8.                x : a matrix or vector.
  9.     
  10.                y : a matrix or vector.
  11.     
  12.         pairwise : logical.
  13.     
  14.            na.rm : logical.
  15.     
  16.     _D_e_s_c_r_i_p_t_i_o_n:
  17.     
  18.          var computes the variance of x and the covariance of x
  19.          and y if x and y are vectors. If x and y are matrices
  20.          then the covariance between the columns of x and the
  21.          the columns of y are computed.
  22.     
  23.          If na.rm is TRUE then missing values are removed from
  24.          the vectors before calculation.  If pairwise is FALSE
  25.          (the default), missing values in matrices are handled
  26.          by casewise deletion.  If pairwise is TRUE, all cases
  27.          which are complete for a pair of variables is used to
  28.          compute the covariance for that pair of variables.
  29.          This can result in covariance matrices which are not
  30.          positive semidefinite.
  31.     
  32.     _E_x_a_m_p_l_e_s:
  33.     
  34.          var(1:10)
  35.          # 9.166667
  36.     
  37.          var(1:5,1:5)
  38.          # 2.5
  39.     
  40.