-
Notifications
You must be signed in to change notification settings - Fork 0
/
eta.qmd
94 lines (66 loc) · 1.33 KB
/
eta.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
```{r setup, include = FALSE}
source("global.R")
```
# ETA plots
## Setup
We start by defining a set of ETAs to use in the plots.
```{r}
etas <- c(
"ETA1//ETA-CL",
"ETA2//ETA-V2",
"ETA3//ETA-KA"
)
```
This is in the `col-label` format described earlier. We also set out a set
of covariates that we can use for ETA diagnostics.
```{r}
covs <- c(
"WT//Weight (kg)",
"ALB//Albumin (g/dL)",
"SCR//Creatinine (mg/dL)"
)
```
## Data used on this page
We are exclusively using a data set that is one row per individual
:::{.callout-note collapse=true appearance="simple"}
## Preview the data used on this page
```{r}
head(as.data.frame(id), n=3)
```
:::
## Versus continuous `[eta_cont]`
Grouped by eta
```{r}
#| fig-width: 6
#| fig-height: 6
eta_cont(id, x = covs, y = etas[2]) %>%
pm_grid()
```
Grouped by covariate
```{r}
#| fig-width: 6
#| fig-height: 6
eta_cont(id, x = covs[1], y = etas) %>%
pm_grid(ncol = 2)
```
## By categorical `[eta_cat]`
```{r}
#| fig-width: 6
#| fig-height: 6
eta_cat(id, x = "STUDYc//Study type", y = etas) %>%
pm_grid()
```
## Histograms `[eta_hist]`
```{r}
#| fig-width: 6
#| fig-height: 6
eta_hist(id, etas, bins = 10) %>%
pm_grid()
```
## Pairs `[eta_pairs]`
See also [Chapter -@sec-pairs] on making pairs plots.
```{r}
#| fig-width: 6
#| fig-height: 5
eta_pairs(id, etas)
```