Learn R Programming

qle (version 0.18)

nextLOCsample: Generate a random sample of points

Description

Generate a random sample of points as a set of candidate points for evaluation

Usage

nextLOCsample(S, x, n, lb, ub, pmin = 0.05, invert = FALSE)

Arguments

S

variance matrix of sample points (usually chosen as the information matrix)

x

an approximate root as the mean value if the multivariate normal distribution

n

number of points to randomly sample

lb

vector of lower bounds of the (hyper)box

ub

vector of upper bounds of the (hyper)box

pmin

minimum required ratio of points falling inside the hyperbox of parameters

invert

optional, invert=FALSE (default) for no inversion of `S`

Value

Matrix of sampled locations.

Details

The function generates a random sample of points with mean and variance given by `x` and `S`, respectively, according to a (truncated) multivariate normal distribution (using rejection sampling) to match the parameter space given by the lower and upper bound vectors.

Examples

Run this code
# NOT RUN {
 X <- nextLOCsample(matrix(c(1,0,0,1),nr=2), c(0,0), 10, c(-0.5,-0.5), c(0.5,0.5))
 
# }

Run the code above in your browser using DataLab