beta_params: Compute parameters of a beta distribution

Description Usage Arguments Examples

View source: R/beta-dist.R

Description

Given two parameters which characterize a beta distribution, compute the remaining parameters in the following set shape1 (a), shape2 (2), mean, mode, sd, and concentration (k).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
beta_params(
  shape1 = NULL,
  shape2 = NULL,
  mean = NULL,
  sd = NULL,
  concentration = NULL,
  mode = NULL,
  a = shape1,
  b = shape2,
  k = concentration,
  plot = FALSE,
  ...
)

Arguments

shape1, a

first shape parameter

shape2, b

second shape paramter

mean

mean of beta distribution

sd

standard deviation of beta distribution

concentration, k

concentration of beta distribution

mode

mode of beta distribution

plot

logical indicating whether a plot of the distribution should be displayed.

...

additional arguments passed to ggformula::gf_dist() to modify the plot produced if plot == TRUE.

Examples

1
2
3
4
5
6
beta_params(10, 5)
beta_params(mean = 0.8, concentration = 10)
beta_params(mean = 0.8, k = 10)
beta_params(mode = 0.8, concentration = 10)
beta_params(mode = 0.8, k = 10)
beta_params(mode = 0.8, k = 10, plot = TRUE, color = "red")

rpruim/CalvinBayes documentation built on April 12, 2021, 1:49 p.m.