find_edge_between_groups: find_edge_between_groups

Description Usage Arguments Examples

Description

Function to find the edges between two groups of variables.

Usage

1
find_edge_between_groups(pdag, group1, group2)

Arguments

pdag
group1
group2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##---- 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, group1, group2)
{
    t = 0
    abs_group1 <- list()
    abs_group2 <- list()
    for (i in group1) {
        conn_list = find_conn_edges(pdag, i)
        for (z in conn_list) {
            if (z %in% group2) {
                t = t + 1
                abs_group1[t] <- i
                abs_group2[t] <- z
            }
        }
    }
    absList <- list(abs_group1 = abs_group1, abs_group2 = abs_group2)
    return(absList)
  }

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