home *** CD-ROM | disk | FTP | other *** search
-
- _C_o_v_a_r_i_a_n_c_e _M_a_t_r_i_c_e_s
-
- var(x, y=x, na.rm=FALSE, pairwise=FALSE)
-
- _A_r_g_u_m_e_n_t_s:
-
- x : a matrix or vector.
-
- y : a matrix or vector.
-
- pairwise : logical.
-
- na.rm : logical.
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- var computes the variance of x and the covariance of x
- and y if x and y are vectors. If x and y are matrices
- then the covariance between the columns of x and the
- the columns of y are computed.
-
- If na.rm is TRUE then missing values are removed from
- the vectors before calculation. If pairwise is FALSE
- (the default), missing values in matrices are handled
- by casewise deletion. If pairwise is TRUE, all cases
- which are complete for a pair of variables is used to
- compute the covariance for that pair of variables.
- This can result in covariance matrices which are not
- positive semidefinite.
-
- _E_x_a_m_p_l_e_s:
-
- var(1:10)
- # 9.166667
-
- var(1:5,1:5)
- # 2.5
-
-