-
Notifications
You must be signed in to change notification settings - Fork 0
/
dv-pred.qmd
67 lines (44 loc) · 1.06 KB
/
dv-pred.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
---
fig-height: 4.5
fig-width: 4.5
---
```{r setup, include = FALSE}
source("global.R")
```
# Observed vs predicted
We define a variable that can be passed as `yname`, or the name of `DV`
```{r}
.yname
```
## DV versus PRED `[dv_pred]`
```{r}
dv_pred(df, yname = .yname)
```
### Un-fix x- and y-axis limits
By default, pmplots forces the x- and y- scales to have the same limits so you
get a square plot. You can prevent this behavior with
```{r}
dv_pred(df, scales = "free")
```
If you are faceting, you'll have to pass `scales="free"` to both `dv_pred()` and
`facet_wrap()`
```{r}
dv_pred(df, scales = "free") + facet_wrap(~RF, scales = "free")
```
## DV versus PRED - log/log {.unnumbered .unlisted}
```{r}
dv_pred(df, loglog=TRUE, yname = .yname)
```
## DV versus IPRED `[dv_ipred]`
```{r}
dv_ipred(df, yname = .yname)
```
## DV versus IPRED - log/log {.unnumbered .unlisted}
```{r}
dv_ipred(df, loglog = TRUE, yname = .yname)
```
## DV versus both PRED and IPRED `[dv_preds]`
```{r}
#| fig-width: 8
dv_preds(df, yname = .yname) %>% pm_grid(ncol = 2)
```