fitConGraph               package:ggm               R Documentation

_F_i_t_t_i_n_g _o_f _G_a_u_s_s_i_a_n _c_o_n_c_e_n_t_r_a_t_i_o_n _g_r_a_p_h _m_o_d_e_l_s

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

     Fits a concentration graph (a covariance selection model)  to a
     sample covariance matrix, assuming a Gaussian model.

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

     fitConGraph(amat, S, n, pri = FALSE, alg=2, tol = 1e-06)

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

    amat: a square Boolean matrix representing the adjacency matrix of
          the DAG

       S: a symmetric positive definite matrix, the sample covariance
          matrix

       n: an postive integer, the sample size

     pri: a logical value. If 'TRUE' a the value of the deviance at
          each iteration is printed.

     alg: and integer specifying the algorithm: if 'alg=1' then the
          covariance matrix is updated, if 'alg=2'  the concentration
          matrix is updated.  

     tol: a small positive number indicating the tolerance used in
          convergence tests. 

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

     Algorithms for fitting Gaussian graphical models specified by
     undirected graphs are discussed in Speed & Kiiveri (1986). This
     function is based on the iterative proportional fitting algorithm
     described on p. 184 of Whittaker (1990).

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

    Shat: the fitted covariance matrix.

     dev: the `deviance' of the model.

      df: the degrees of freedom.

      it: the iterations.

_A_u_t_h_o_r(_s):

     Giovanni M. Marchetti

_R_e_f_e_r_e_n_c_e_s:

     Cox, D. R. & Wermuth, N. (1996). _Multivariate dependencies_.
     London: Chapman & Hall.

     Speed, T.P. & Kiiveri, H (1986). Gaussian Markov distributions
     over finite graphs. _Annals of Statistics_, 14, 138-150.

     Whittaker, J. (1990). _Graphical models in applied multivariate
     statistics_. Chichester: Wiley.

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

     'UG', 'fitDag', 'cliques', 'marks'

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

     ## A model for the sample covariance matrix of the
     ## mathematics marks (Whittaker, 1990)
     data(marks)
     S <- cov(marks) * 87 / 88
     ## A butterfly concentration graph
     fitConGraph(UG(~ mechanics*vectors*algebra + algebra*analysis*statistics), S , n = 88)

