ffm_describe_betas: Generates example Beta distributions.

View source: R/monte_carlo_functions.R

ffm_describe_betasR Documentation

Generates example Beta distributions.

Description

This function can be used to explore the shapes and parameters of alternative Beta distributions. Given one or more values for each of the two Beta parameters, it calculates the density curve for each combination plus the mean, mode and variance of the distribution.

Usage

ffm_describe_betas(
  beta.a = c(2, 5, 10),
  beta.b = c(2, 5, 10),
  show.plot = TRUE
)

Arguments

beta.a

Vector of one or more values for parameter a (called shape1 by R beta functions).

beta.b

Vector of one or more values for parameter b (called shape2 by R beta functions).

show.plot

If TRUE, display the resulting distributions.

Details

Note that this function will draw and describe Beta distributions with any valid parameter values, but the ffm_param_variance function only accepts distributions where both parameters are greater than one to ensure that the mode exists.

Value

Invisibly returns a list with elements:

plot

A ggplot object showing the distributions.

summary

A data frame summarizing the moments of the distributions.

See Also

ffm_param_variance which has an option to use a Beta distribution to vary parameter values.


pzylstra/frame_r documentation built on Nov. 12, 2023, 1:55 a.m.