R/observed.graph.R

Defines functions observed.graph

observed.graph <- function(G) {
  obs.edges <- setdiff(igraph::E(G), igraph::E(G)[which(igraph::edge.attributes(G)$description == "U")])
  G.obs <- igraph::subgraph.edges(G, igraph::E(G)[obs.edges], delete.vertices = FALSE)
  return(G.obs)
}

Try the causaleffect package in your browser

Any scripts or data that you put into this service are public.

causaleffect documentation built on July 14, 2022, 5:07 p.m.