checkIdent                package:ggm                R Documentation

_I_d_e_n_t_i_f_i_a_b_i_l_i_t_y _o_f _a _m_o_d_e_l _w_i_t_h _o_n_e _l_a_t_e_n_t _v_a_r_i_a_b_l_e

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

     Checks  four sufficient conditions for identifiability of a
     Gaussian DAG model with one latent variable.

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

     checkIdent(amat, latent)

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

    amat: a square matrix with dimnames, representing the adjacency
          matrix of a DAG.

  latent: an integer representing the latent variables among the nodes,
          or the name of the node.

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

     Stanghellini and Wermuth (2003) give some sufficient conditions
     for checking if a Gaussian model that factorizes according to a
     DAG is identified when there is one hidden node over which we
     marginalize. Specifically, the function checks the conditions of
     Theorem 1, (i) and (ii) and of Theorem 2 (i) and (ii).

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

     a vector of length  four, indicating if the model is identified
     according to the conditions of theorems 1 and 2 in Stanghellini &
     Wermuth (2003). The answer is 'TRUE' if the  condition holds and
     thus the model is globally identified or 'FALSE' if the condition
     fails, and thus we do not know if the model is identifiable.

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

     Giovanni M. Marchetti

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

     Stanghellini, E. & Wermuth, N. (2003). On the identification of
     path-analysis models with one hidden variable. Submitted and
     available at <URL: http://psystat.sowi.uni-mainz.de>.

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

     'isGident',  'InducedGraphs'

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

     ## See DAG in Figure 4 (a) in Stanghellini & Wermuth (2003)
     d <- DAG(y1 ~ y3, y2 ~ y3 + y5, y3 ~ y4 + y5, y4 ~ y6)
     checkIdent(d, "y3")  # Identifiable
     checkIdent(d, "y4")  # Not identifiable?

     ## See DAG in Figure 5 (a) in Stanghellini & Wermuth (2003)
     d <- DAG(y1 ~ y5+y4, y2 ~ y5+y4, y3 ~ y5+y4)
     checkIdent(d, "y4")  # Identifiable
     checkIdent(d, "y5")  # Identifiable

     ## A simple function to check identifiability for each node

     is.ident <- function(amat){
     ### Check suff. conditions on each node of a DAG.
        p <- nrow(amat)
        ## Degrees of freedom
          df <- p*(p+1)/2 - p  - sum(amat==1) - p + 1
        if(df <= 0)
            warning(paste("The degrees of freedom are ", df))
         a <- rownames(amat)
         for(i in a) {
           b <- checkIdent(amat, latent=i)
           if(TRUE %in% b)
             cat("Node", i, names(b)[!is.na(b)], "\n")
           else
             cat("Unknown.\n")
         }
       }

