Description Usage Arguments Value Examples

View source: R/equilibrium_distributions.R

Random number generation from a mixture of two gamma distributions and the related equilibrium distribution,
for use with `r_behavior_stream`

.

1 | ```
F_gam_mix(shape1, shape2, scale_ratio, mix)
``` |

`shape1` |
shape parameter for first mixture component, |

`shape2` |
shape parameter for second mixture component, |

`scale_ratio` |
ratio of first scale component to second scale component, |

`mix` |
mixing proportion of first component, |

Object of class `eq_dist`

with components `r_gen`

and `r_eq`

.

The function `r_gen(n, mean)`

generates random deviates from a mixture of two gamma distributions with specified
`mean`

, `shape1`

, `shape2`

, `scale_ratio`

, and `mix`

. The cumulative distribution function
is given by

*F(x) = p Γ(x; k_1, θ_1) + (1 - p) Γ(x; k_2, θ_2),*

where *Γ(x; k, θ)*
is the cumulative distribution function of a Gamma random variable with shape *k* and scale *θ*, and
the scale parameters are determined by the specified `mean`

and `scale_ratio`

.

The function `r_eq(n, mean)`

generates random deviates from the equilibrium distribution corresponding
to the mixture of gamma distributions.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.