Skip to content

Commit

Permalink
update vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 4, 2024
1 parent 8623a17 commit fe94bf3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/testthat/test-plot.check_dag.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
skip_if_not_installed("vdiffr")
skip_if_not_installed("ggdag")
skip_if_not_installed("dagitty")

test_that("`plot()` for check_dag", {
set.seed(1234)
Expand Down
29 changes: 26 additions & 3 deletions vignettes/performance.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ knitr::opts_chunk$set(
message = FALSE
)
pkgs <- c("bayestestR", "ggplot2", "glmmTMB", "performance", "lme4")
pkgs <- c("bayestestR", "ggplot2", "glmmTMB", "performance", "lme4", "ggdag", "dagitty")
successfully_loaded <- vapply(pkgs, requireNamespace, FUN.VALUE = logical(1L), quietly = TRUE)
can_evaluate <- all(successfully_loaded)
Expand Down Expand Up @@ -139,7 +139,7 @@ There are two visualization options
plot(result, type = "dots")
```

### bars indicating influential observations
### bars indicating influential observations

```{r}
plot(result, type = "bars")
Expand Down Expand Up @@ -324,6 +324,29 @@ result
plot(result)
```

# Directed Acyclic Graphs (DAG)

_([related function documentation](https://easystats.github.io/performance/reference/check_dag.html))_

```{r}
dag <- check_dag(
y ~ x + b + c,
x ~ b,
outcome = "y",
exposure = "x",
coords = list(
x = c(y = 5, x = 4, b = 3, c = 3),
y = c(y = 3, x = 3, b = 2, c = 4)
)
)
# plot comparison between current and required model
plot(dag)
# plot current model specification
plot(dag, which = "current")
# plot required model specification
plot(dag, which = "required")
```

# ROC curves

_([related function documentation](https://easystats.github.io/performance/reference/performance_roc.html))_
Expand All @@ -344,7 +367,7 @@ result
plot(result)
```

You can also compare ROC curves for different models.
You can also compare ROC curves for different models.

```{r}
set.seed(123)
Expand Down

0 comments on commit fe94bf3

Please sign in to comment.