Description Usage Arguments Note Author(s) Examples

Function for plotting parameter prior distributions.

1 2 3 4 5 6 7 | ```
plot_prior(
prior_par = list(mu_psi = 0, sigma_psi = 1, mu_beta = 0, sigma_beta = 1),
what = "logor",
hypothesis = "H1",
p1 = 0.5,
...
)
``` |

`prior_par` |
list with prior parameters. This list needs to contain the
following elements: |

`what` |
character specifying for which quantity the prior should be
plotted. Either |

`hypothesis` |
character specifying whether to plot a two-sided prior (i.e., "H1"), a one-sided prior with lower truncation point (i.e., "H+"), or a one-sided prior with upper truncation point (i.e., "H-"). |

`p1` |
value of the "success" probability in the control condtion. Only
used when |

`...` |
further arguments. |

Internally, the test-relevant prior is always a normal prior on the log
odds ratio, however, the `plot_prior`

function also allows one to plot
the implied prior on different quantities.

Quentin F. Gronau

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
# prior parameters
prior_par <- list(mu_psi = 0, sigma_psi = 1,
mu_beta = 0, sigma_beta = 1)
# plot prior
plot_prior(prior_par = prior_par, what = "logor")
plot_prior(prior_par = prior_par, what = "or")
plot_prior(prior_par = prior_par, what = "p1p2")
plot_prior(prior_par = prior_par, what = "p1")
plot_prior(prior_par = prior_par, what = "p2")
plot_prior(prior_par = prior_par, what = "p2givenp1", p1 = 0.3)
plot_prior(prior_par = prior_par, what = "rrisk")
plot_prior(prior_par = prior_par, what = "arisk")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.