Density Beta Rectangular Distribution | R Documentation |
Gives the density value of a univariate Beta Rectangular Distribution.
dbetar(x, pi, mu, phi, log = FALSE)
x |
value or vector of values, to apply in the mixture probability density function. |
pi |
vector of mixture weights. |
mu |
value of parameter. |
phi |
value of parameter. |
log |
logical; if TRUE, probabilities p are given as log(p). |
The mixture has density
f(x) = π_1 + π_2 * (x^(mu*phi - 1) * (1 - x)^((1-mu)*phi)).
CASTRO, M. O.; MONTALVO, G. S. A.
f <- function(x){dbetar(x, pi = c(0.5, 0.5), mu = 0.4, phi = 3)} ## Plot using graphics package require(graphics) curve(f, 0, 1) require(ggplot2) ## Plot using ggplot2 package ggplot(data.frame(x=c(0, 1)), aes(x)) + stat_function(fun=f, size = 1L, colour = "#0c4c8a") + theme_minimal() ## Integrate integrate(f, 0, 1)$value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.