xpnd                package:MCMCpack                R Documentation

_E_x_p_a_n_d _a _V_e_c_t_o_r _i_n_t_o _a _S_y_m_m_e_t_r_i_c _M_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     This function takes a vector of appropriate length (typically
     created using 'vech') and creates a symmetric matrix.

_U_s_a_g_e:

        xpnd(x, nrow)

_A_r_g_u_m_e_n_t_s:

       x: A list of elements to expand into symmetric matrix.

    nrow: The number of rows (and columns) in the returned matrix. Look
          into the details.

_D_e_t_a_i_l_s:

     This function is particularly useful when dealing with variance
     covariance matrices. Note that R stores matrices in column major
     order, and that the items in 'x' will be recycled to fill the
     matrix if need be.

     The number of rows can be specified or automatically computed from
     the number of elements in a given object via   (-1 + sqrt{(1 + 8 *
     length(x))}) / 2.

_V_a_l_u_e:

     An (nrows * nrows) symmetric matrix.

_S_e_e _A_l_s_o:

     'vech'

_E_x_a_m_p_l_e_s:

       xpnd(c(1,2,3,4,4,5,6,7,8,9),4)
       xpnd(c(1,2,3,4,4,5,6,7,8,9))

