rUniformPrior returns a random vector generator
rUniformPrior.RdThe 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.08183302 1.369236 2.126667
#> [2,] 0.73987251 1.955866 2.668675
#> [3,] 0.46808935 1.538192 2.330954
#> [4,] 0.62868211 1.452552 2.888015
#> [5,] 0.78420182 1.138060 2.281313
#> [6,] 0.70694650 1.442187 2.677699
#> [7,] 0.70071499 1.068406 2.958504
#> [8,] 0.24448352 1.926283 2.502747
#> [9,] 0.93551714 1.438800 2.350487
#> [10,] 0.47650409 1.966160 2.297162
#> [11,] 0.29064831 1.859722 2.193313
#> [12,] 0.80910837 1.365487 2.252700