dmixinvgamma | R Documentation |
Density of a mixture of invserse gamma distributions
dmixinvgamma(x, w, shape, rate)
x |
vector of quantiles |
w |
weights which sum up to one |
shape |
shape parameter |
rate |
rate parameter |
n <- c(8000, 4000) x <- c(rgamma(n[1], shape = 3, rate = 2), rgamma(n[2], shape = 5, rate = 4)) hist(1/x, breaks = 1000, freq = FALSE, xlim = c(0, 4)) x_plot <- seq(0.001, 10, length.out = 1000) y_plot <- dmixinvgamma(x_plot, w = n/sum(n), shape = c(3, 5), rate = c(2,4)) points(x_plot, y_plot, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.