number_v_nodes: number_v_nodes

Description Usage Arguments Examples

Description

Function to check the number of v-structures in a graph.

Usage

1

Arguments

pdag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (pdag)
{
    ind <- which((pdag == 1 & t(pdag) == 0), arr.ind = TRUE)
    v_nodes <- ind[duplicated(ind[, 2]), 2]
    no_v_nodes <- length(v_nodes)
    return(no_v_nodes)
  }

gekepals/pcabs documentation built on June 15, 2019, 12:03 a.m.