checkIdent {ggm}R Documentation

Identifiability of a model with one latent variable

Description

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

Usage

checkIdent(gmat, hidden)

Arguments

gmat a square Boolean matrix with dimnames, the edge matrix of a DAG.
hidden an integer representing the latent variables among the nodes, or the name of the node.

Details

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).

Value

a vector of logical values, indicating if each of the four conditions of theorems 1 and 2 in Stanghellini & Wermuth are TRUE or FALSE.

Author(s)

Giovanni M. Marchetti

References

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

See Also

is.Gident, InducedGraphs

Examples

## 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(gmat, compact=TRUE){
### Check suff. conditions marginalising on each node of a DAG. 
    a <- rownames(gmat)
    for(i in a) {
        b <- checkIdent(gmat, hidden=i)
      if(compact)
        b <- any(b)
      
      cat("Node: ", i, "\n")
      print(b)
    }
  }


[Package Contents]