Uniform: Create a Continuous Uniform distribution

Description Usage Arguments Value See Also Examples

View source: R/Uniform.R

Description

A distribution with constant density on an interval. The continuous analogue to the Categorical() distribution.

Usage

1
Uniform(a = 0, b = 1)

Arguments

a

The a parameter. a can be any value in the set of real numbers. Defaults to 0.

b

The a parameter. b can be any value in the set of real numbers. It should be strictly bigger than a, but if is not, the order of the parameters is inverted. Defaults to 1.

Value

A Uniform object.

See Also

Other continuous distributions: Beta(), Cauchy(), ChiSquare(), Erlang(), Exponential(), FisherF(), Frechet(), GEV(), GP(), Gamma(), Gumbel(), LogNormal(), Logistic(), Normal(), RevWeibull(), StudentsT(), Tukey(), Weibull()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
set.seed(27)

X <- Uniform(1, 2)
X

random(X, 10)

pdf(X, 0.7)
log_pdf(X, 0.7)

cdf(X, 0.7)
quantile(X, 0.7)

cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 0.7))

distributions3 documentation built on Jan. 4, 2022, 1:07 a.m.