Skip to contents

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.

Usage

rUniformPrior(ll, ul)

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.12811576 1.538633 2.129016
#>  [2,] 0.51096488 1.543793 2.241776
#>  [3,] 0.80314412 1.947914 2.407361
#>  [4,] 0.51474456 1.981542 2.354187
#>  [5,] 0.45584015 1.220025 2.081833
#>  [6,] 0.36923607 1.126667 2.739873
#>  [7,] 0.95586629 1.668675 2.468089
#>  [8,] 0.53819245 1.330954 2.628682
#>  [9,] 0.45255247 1.888015 2.784202
#> [10,] 0.13805955 1.281313 2.706946
#> [11,] 0.44218692 1.677699 2.700715
#> [12,] 0.06840642 1.958504 2.244484