Description Objects from the Class Slots Extends Is-Relations Methods Author(s) See Also Examples

The uniform distribution has density

*d(x) = 1/(max-min)*

for *min*, by default *=0*, *≤ x ≤ max*, by default *=1*.
C.f. `runif`

Objects can be created by calls of the form `Unif(Min, Max)`

.
This object is a uniform distribution.

`img`

Object of class

`"Reals"`

: The space of the image of this distribution has got dimension 1 and the name "Real Space".`param`

Object of class

`"UnifParameter"`

: the parameter of this distribution (Min and Max), declared at its instantiation`r`

Object of class

`"function"`

: generates random numbers (calls function`runif`

)`d`

Object of class

`"function"`

: density function (calls function`dunif`

)`p`

Object of class

`"function"`

: cumulative function (calls function`punif`

)`q`

Object of class

`"function"`

: inverse of the cumulative function (calls function`qunif`

)`.withArith`

logical: used internally to issue warnings as to interpretation of arithmetics

`.withSim`

logical: used internally to issue warnings as to accuracy

`.logExact`

logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function

`.lowerExact`

logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function

`Symmetry`

object of class

`"DistributionSymmetry"`

; used internally to avoid unnecessary calculations.

Class `"AbscontDistribution"`

, directly.

Class `"UnivariateDistribution"`

, by class `"AbscontDistribution"`

.

Class `"Distribution"`

, by class `"AbscontDistribution"`

.

By means of `setIs`

, R “knows” that a distribution object `obj`

of class `"Unif"`

with Min 0 and Max 1 also is
a Beta distribution with parameters `shape1 = 1, shape2 = 1, ncp = 0`

.

- initialize
`signature(.Object = "Unif")`

: initialize method- Min
`signature(object = "Unif")`

: returns the slot`Min`

of the parameter of the distribution- Min<-
`signature(object = "Unif")`

: modifies the slot`Min`

of the parameter of the distribution- Max
`signature(object = "Unif")`

: returns the slot`Max`

of the parameter of the distribution- Max<-
`signature(object = "Unif")`

: modifies the slot`Max`

of the parameter of the distribution- *
`signature(e1 = "Unif", e2 = "numeric")`

: multiplication of this uniform distribution by an object of class ‘numeric’- +
`signature(e1 = "Unif", e2 = "numeric")`

: addition of this uniform distribution to an object of class ‘numeric’

Thomas Stabla [email protected],

Florian Camphausen [email protected],

Peter Ruckdeschel [email protected],

Matthias Kohl [email protected]

`UnifParameter-class`

`AbscontDistribution-class`

`Reals-class`

`runif`

1 2 3 4 5 6 7 8 9 10 11 12 | ```
U <- Unif(Min=0,Max=2) # U is a uniform distribution with Min=0 and Max=2.
r(U)(1) # one random number generated from this distribution, e.g. 1.984357
d(U)(1) # Density of this distribution is 0.5 for x=1.
p(U)(1) # Probability that x<1 is 0.5.
q(U)(.1) # Probability that x<0.2 is 0.1.
## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
Min(U) # Min of this distribution is 0.
Min(U) <- 1 # Min of this distribution is now 1.
Min(U) # Min of this distribution is 1.
Min(U) <- 0
is(U/2,"Beta") # yes
V <- U/2; as(V,"Beta")
``` |

distr documentation built on July 9, 2018, 3 a.m.

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.