beta_get_shape_params | R Documentation |
mu
) and cv
which is what is in the SS files.Calculate the two shape parameters from the mean (mu
) and cv
which is what is in the SS files.
beta_get_shape_params(mu, cv)
mu |
The mean of the Beta distribution |
cv |
The CV of the Beta distribution |
To make a plot of the Beta function based on values from SS3 which are
labelled prior
and pr_sd
in the control file, do this:
s1 <- beta_get_shape_params(prior, pr_sd)[1]
s2 <- beta_get_shape_params(prior, pr_sd)[2]
ggplot() +
geom_function(fun = stats::dbeta,
args = list(shape1 = s1, shape2 = s2, log = FALSE))
A vector of two values, the two shape parameters, also know as
shape1
and shape2
by the stats::dbeta()
function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.