rgsm | R Documentation |
Simulates realizations from a gamma shape mixture (GSM) model with probability density function given by
f(x,{Θ}) = ∑_{j=1}^{K}ω_j \frac{β^j}{Γ(j)} x^{j-1} \exp\bigl( -β x\bigr),
where Θ=(ω_1,…,ω_K, β)^T is the parameter vector and known constant K is the number of components. The vector of mixing parameters is given by ω=(ω_1,…,ω_K)^T where ω_js sum to one, i.e., ∑_{j=1}^{K}ω_j=1. Here β is the rate parameter that is equal for all components.
rgsm(n, omega, beta)
n |
Number of requested random realizations. |
omega |
Vector of the mixing parameters. |
beta |
The rate parameter. |
A vector of length n
, giving random generated values from GSM model.
Mahdi Teimouri
S. Venturini, F. Dominici, and G. Parmigiani, 2008. Gamma shape mixtures for heavy-tailed distributions, The Annals of Applied Statistics, 2(2), 756–776.
n<-100 omega<-c(0.05, 0.1, 0.15, 0.2, 0.25, 0.25) beta<-2 rgsm(n, omega, beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.