-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathintroduction.Rmd
More file actions
55 lines (40 loc) · 1.33 KB
/
Copy pathintroduction.Rmd
File metadata and controls
55 lines (40 loc) · 1.33 KB
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
---
title: "Introduction"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
## Draws from the prior distribution
```{r prior, eval=FALSE}
library(vizdraws)
vizdraws(prior = 'normal(0.05, 0.2)')
```
<div align="center">
<iframe style="min-height:50vh" src="https://ignacio.martinez.fyi/vizdraws/prior.html" frameborder="0" scrolling="no" seamless="seamless" width="100%"></iframe>
</div>
## Updating the prior
```{r posterior, eval=FALSE}
vizdraws(prior = 'normal(0.05, 0.2)',
posterior = rnorm(n = 10000, mean = 0.3, sd = 0.5))
```
<div align="center">
<iframe style="min-height:50vh" src="https://ignacio.martinez.fyi/vizdraws/prior2posterior.html" frameborder="0" scrolling="no" seamless="seamless" width="100%"></iframe>
</div>
## Minimum meaningful effect
```{r mme, eval=FALSE}
vizdraws(prior = rnorm(n = 10000, mean = 0, sd = 1),
posterior = rnorm(n = 10000, mean = 0.3, sd = 0.5),
xlim = c(-3,3),
MME = 0.1)
```
<div align="center">
<iframe style="min-height:50vh" src="https://ignacio.martinez.fyi/vizdraws/mme.html" frameborder="0" scrolling="no" seamless="seamless" width="100%"></iframe>
</div>