• incanter

cdf-uniform

incanter.stats

• (cdf-uniform x & options)
Returns the Uniform cdf of the given value of x. It will return a sequence
of values, if x is a sequence. This is equivalent to R's punif function.

Options:
:min (default 0)
:max (default 1)

pdf-uniform and sample-uniform

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/DoubleUniform.html
http://en.wikipedia.org/wiki/Uniform_distribution
http://en.wikipedia.org/wiki/Cumulative_distribution_function

Example:
(cdf-uniform 5)
(cdf-uniform 5 :min 1 :max 10)

Source incanter/stats.clj:378 top

```(defn cdf-uniform
" Returns the Uniform cdf of the given value of x. It will return a sequence
of values, if x is a sequence. This is equivalent to R's punif function.

Options:
:min (default 0)
:max (default 1)

pdf-uniform and sample-uniform

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/DoubleUniform.html
http://en.wikipedia.org/wiki/Uniform_distribution
http://en.wikipedia.org/wiki/Cumulative_distribution_function

Example:
(cdf-uniform 5)
(cdf-uniform 5 :min 1 :max 10)
"
([x & options]
(let [opts (when options (apply assoc {} options))
min (double (or (:min opts) 0.0))
max (double (or (:max opts) 1.0))
dist (DoubleUniform. min max (DoubleMersenneTwister.))]
(if (coll? x)
(map #(.cdf dist %) x)
(.cdf dist x)))))```
Vars in incanter.stats/cdf-uniform: coll? defn let map
Used in 0 other vars