From cc54a74db924e6f043d0497d79f23f7c26827236 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Aug 2024 20:34:24 +0200 Subject: [PATCH] docs --- R/plot.check_dag.R | 12 ++++++++++++ man/plot.see_check_dag.Rd | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/R/plot.check_dag.R b/R/plot.check_dag.R index 74bd3cc06..147500c89 100644 --- a/R/plot.check_dag.R +++ b/R/plot.check_dag.R @@ -28,6 +28,18 @@ #' #' # plot only model with required adjustments #' plot(dag, which = "required") +#' +#' # collider-bias? +#' dag <- check_dag( +#' y ~ x + c + d, +#' x ~ c + d, +#' b ~ x, +#' b ~ y, +#' outcome = "y", +#' exposure = "x", +#' adjusted = "c" +#' ) +#' plot(dag) #' @export plot.see_check_dag <- function(x, size_point = 15, diff --git a/man/plot.see_check_dag.Rd b/man/plot.see_check_dag.Rd index 0b8a0d1b4..f1b00acd4 100644 --- a/man/plot.see_check_dag.Rd +++ b/man/plot.see_check_dag.Rd @@ -50,5 +50,17 @@ plot(dag) # plot only model with required adjustments plot(dag, which = "required") + +# collider-bias? +dag <- check_dag( + y ~ x + c + d, + x ~ c + d, + b ~ x, + b ~ y, + outcome = "y", + exposure = "x", + adjusted = "c" +) +plot(dag) \dontshow{\}) # examplesIf} }