fitCovGraph               package:ggm               R Documentation

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

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

     Fits a Gaussian covariance graph by maximum likelihood.

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

     fitCovGraph(amat, S, n, alg = "icf", dual.alg = 2, start.icf = NULL, tol = 1e-06)

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

    amat: A symmetric Booloean matrix with dimnames representing the
          adjacency matrix of the graph.

       S: A symmetric positive definite matrix with dimnames, the
          sample covariance matrix

       n: A positive integer, the sample size.

     alg: A character string, the algorithm used. If  'alg="icf"' (the
          default) the algorithm is based on iterative conditional
          fitting (see Drton and Richardson, 2003). In this case the ML
          estimates are returned. If  'alg="dual"' the algorithm is
          based on the dual likelihood (see Kauermann, 1996). The
          fitted values are not true ML estimates.  

dual.alg: And integer equal to 1 or 2. It is used if 'alg="dual"'. In
          this case a concentration graph model is fitted to the
          inverse of the sample covariance matrix, and 'dual.alg' is
          passed to 'fitConGraph' to specify the algorithm used in
          'fitConGraph'. 

start.icf: A symmetric matrix used as starting value of the algorithm.
          If 'start=NULL' the starting value is a diagonal matrix with
          diagonal entries equal to sample variances.

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

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

     A covariance graph is an undirected graph  in which the variables
     associated to two non-adjacent nodes are marginally independent.
     The edges of these models are represented by bidirected edges
     (Drton & Richardson, 2003) or by dashed lines (Cox & Wermuth,
     1996).

     By default, this function gives the ML estimates in the covariance
      graph model, by a new iterative method (Drton & Richardson,
     2003).  If desired then estimates from a ``dual likelihood''
     heuristic (Kauermann, 1996; Edwards, 2000, \S 7.4).

_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):

     Mathias Drton

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

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

     Drton, M. & Richardson, T. S. (2003). A new algorithm for maximum
     likelihood estimation in Gaussian graphical models for marginal
     independence. _Proceedings of the Nineteenth Conference on
     Uncertainty in Artificial Intelligence_, 184-191.

     Kauermann, G. (1996). On a dualization of graphical Gaussian
     models. _Scandinavian Journal of Statistics_. 23, 105-116.

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

     'fitConGraph', 'icf'

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

     ## Correlations among four strategies to cope with stress for 
     ## 72 students. Cox & Wermuth (1996), p. 73.
     ##  Y = cognitive avoidance
     ##  X = vigilance
     ##  V = blunting
     ##  U = monitoring

     R <- matrix(c(
        1.00, -0.20,  0.46,  0.01,
       -0.20,  1.00,  0.00,  0.47,
        0.46,  0.00,  1.00, -0.15,
        0.01,  0.47, -0.15,  1.00), 4, 4)
     nam <- c("Y", "X", "V", "U") 
     dimnames(R) <- list(nam, nam)

     ## A chordless 4-cycle covariance graph
     gr <- UG(~ Y*X + X*U + U*V + V*Y)
     fitCovGraph(gr, R, n=72)
     fitCovGraph(gr, R, n=72, alg="dual")

