F_unif: Uniform distribution and related equilibrium distribution

Description Usage Value Examples

View source: R/equilibrium_distributions.R

Description

Random number generation from a uniform distribution and the related equilibrium distribution, for use with r_behavior_stream.

Usage

1

Value

Object of class eq_dist with components r_gen and r_eq.

The function r_gen(n, mean) generates random deviates from a uniform distribution with specified mean μ on the interval (0, 2 μ). The cumulative distribution function is given by F(x) = x / 2 μ.

The function r_eq(n, mean) generates random deviates from the equilibrium distribution corresponding to a uniform distribution on the interval (0, 2 μ). The cumulative distribution function is given by

F(x) = x (4 μ - x) / (4 μ^2).

Examples

1
2
hist(F_unif()$r_gen(1000, 2))
hist(F_unif()$r_eq(1000, 2))

ARPobservation documentation built on May 1, 2021, 1:08 a.m.