Skip to content

Commit

Permalink
revised some examples for faster installation
Browse files Browse the repository at this point in the history
  • Loading branch information
santikka committed Dec 18, 2020
1 parent 4cd0a33 commit 5bf0ebb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
9 changes: 7 additions & 2 deletions man/causal.effect.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ g <- graph.formula(x -+ y, z -+ x, z -+ y , x -+ z, z -+ x, simplify = FALSE)
# This is denoted by giving them a description attribute with the value "U"
# The edges in question are the fourth and the fifth edge
g <- set.edge.attribute(graph = g, name = "description", index = c(4,5), value = "U")
causal.effect(y = "y", x = "x", G = g)
causal.effect("y", "x", G = g)

# Pruning example
p <- graph.formula(x -+ z_4, z_4 -+ y, z_1 -+ x, z_2 -+ z_1,
z_3 -+ z_2, z_3 -+ x, z_5 -+ z_1, z_5 -+ z_4, x -+ z_2, z_2 -+ x,
z_3 -+ z_2, z_2 -+ z_3, z_2 -+ y, y -+ z_2,
z_4 -+ y, y -+ z_4, z_5 -+ z_4, z_4 -+ z_5, simplify = FALSE)
p <- set.edge.attribute(p, "description", 9:18, "U")
causal.effect("y", "x", G = p, primes = TRUE, simp = TRUE, prune = TRUE)
causal.effect("y", "x", G = p, primes = TRUE, prune = TRUE)

# Simplification example
s <- graph.formula(x -+ y, w -+ x, w -+ z, z -+ y)
causal.effect("y", "x", G = s, simp = FALSE)
causal.effect("y", "x", G = s, simp = TRUE)
}
1 change: 0 additions & 1 deletion man/meta.transport.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ d2 <- set.vertex.attribute(d2, "description", 7:11, "S")
d.comb <- list(d1, d2)
meta.transport(y = "Y", x = "X", D = d.comb)
}

1 change: 0 additions & 1 deletion man/recover.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ g <- set.edge.attribute(g, "description", 5:8, "U")
g <- set.vertex.attribute(g, "description", 5, "S")

recover(y = "Y", x = "X", G = g)

}

1 change: 0 additions & 1 deletion man/surrogate.outcome.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ s <- list(

surrogate.outcome(y = "Y", x = "X", S = s, G = g)
}

2 changes: 0 additions & 2 deletions man/transport.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,5 @@ d <- set.edge.attribute(d, "description", 6:11, "U")
d <- set.vertex.attribute(d, "description", 6, "S")

transport(y = "Y", x = "X", D = d)


}

0 comments on commit 5bf0ebb

Please sign in to comment.