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.25932808 1.047175 2.629340
#>  [2,] 0.15550981 1.568841 2.153067
#>  [3,] 0.44828171 1.073414 2.498014
#>  [4,] 0.64062725 1.258818 2.819371
#>  [5,] 0.08757525 1.117172 2.455283
#>  [6,] 0.64184006 1.288677 2.254539
#>  [7,] 0.31233041 1.921789 2.309833
#>  [8,] 0.33966315 1.732594 2.895244
#>  [9,] 0.34990912 1.096313 2.300678
#> [10,] 0.86276669 1.206131 2.052044
#> [11,] 0.58459793 1.763951 2.958937
#> [12,] 0.55018345 1.253618 2.734066