You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/BayesVolcano.Rmd
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ knitr::opts_chunk$set(
20
20
# Data requirements
21
21
22
22
BayesVolcano requires as input:
23
-
- posteriors of a Bayesian model fit stored in a data frame, where columns are parameters and rows are iterations. A wrapper function to extract the posterior exists for fits generated by [rstan](https://mc-stan.org/rstan) or [brms](https://paulbuerkner.com/brms) with the helper function extract_fit.R
23
+
24
+
- posteriors of a Bayesian model fit stored in a data frame, where columns are parameters and rows are iterations. A wrapper function to extract the posterior exists for fits generated by [rstan](https://mc-stan.org/rstan) or [brms](https://paulbuerkner.com/brms) with the helper function extract_fit().
25
+
The usage of extract_fit() requires installation of rstan or brms.
24
26
25
27
```{r setup}
26
28
library(BayesVolcano)
@@ -96,7 +98,7 @@ the user.
96
98
97
99
The simplest version is:
98
100
99
-
```{r}
101
+
```{r,fig.width=7,fig.height=6}
100
102
plot_volcano(results)
101
103
```
102
104
@@ -105,15 +107,15 @@ set threshold for pi is displayed as vertical black line and described in the
105
107
subtitle.
106
108
107
109
Titles and x-axis labels can be set with:
108
-
```{r}
110
+
```{r,fig.width=7,fig.height=6}
109
111
plot_volcano(results,
110
112
title = "My amazing plot",
111
113
xlab = "My informative parameter")
112
114
```
113
115
114
116
115
117
To add the set CrI use:
116
-
```{r}
118
+
```{r,fig.width=7,fig.height=6}
117
119
plot_volcano(results,
118
120
CrI = TRUE)
119
121
```
@@ -124,7 +126,7 @@ to the subtitle.
124
126
To color code the points the user can choose a character of numerical column
125
127
from the annotation_df
126
128
127
-
```{r}
129
+
```{r,fig.width=7,fig.height=6}
128
130
plot_volcano(results,
129
131
CrI = FALSE,
130
132
color = "group")
@@ -137,13 +139,13 @@ plot_volcano(results,
137
139
To add labels the [ggrepel](https://cran.r-project.org/web/packages/ggrepel/vignettes/ggrepel.html)
138
140
is employed:
139
141
140
-
```{r}
142
+
```{r,fig.width=7,fig.height=6}
141
143
plot_volcano(results, label = "label")
142
144
```
143
145
144
146
To only display labels above thresholds for the parameter value and pi set:
145
147
146
-
```{r}
148
+
```{r,fig.width=7,fig.height=6}
147
149
plot_volcano(results,
148
150
label = "label",
149
151
label.parameter.threshold = 1.5,
@@ -153,7 +155,7 @@ plot_volcano(results,
153
155
Grey lines are added to visualize the threshold and a subtitle is added.
0 commit comments