rUniformPrior returns a random vector generator
rUniformPrior.Rd
The return value is a function that generates random vectors of the same size as ll and ul from a uniform distribution within the limits defined by ul and ll. The random vectors are returned as n rows of a matrix, where n is the only argument of the returned function.
Arguments
- ll
lower limit of the random variables (a vector)
- ul
upper limit of the random variables (same size vector as ll)
Value
a uniform random vector generating function: runiform(n), where n is the requested number of vectors (rows)
Examples
rup<-rUniformPrior(ll=c(0,1,2),ul=c(1,2,3))
rup(12)
#> [,1] [,2] [,3]
#> [1,] 0.2017659 1.779887 2.499238
#> [2,] 0.4895477 1.674107 2.127444
#> [3,] 0.9617785 1.043406 2.105318
#> [4,] 0.1932884 1.310649 2.173860
#> [5,] 0.7580357 1.213979 2.633856
#> [6,] 0.5304256 1.347820 2.127685
#> [7,] 0.2679304 1.430573 2.746328
#> [8,] 0.1649105 1.026142 2.182829
#> [9,] 0.3775738 1.672574 2.064191
#> [10,] 0.2725708 1.355262 2.572583
#> [11,] 0.9416142 1.164230 2.005443
#> [12,] 0.1852645 1.415841 2.759976