powered by
This function provides a wrapper for the har function of the hit-and-run package
hit_and_run(A, b, x0, points, thin = 1, burn = 0, chains = 1)
is the lhs of Ax <= b
is the rhs of Ax <= b
is the starting point (a list of points)
is the number of points we want to sample
every thin-th point is stored
the first burn points are deleted
is the number of chains we run
a list of chains of the sampled points, each chain being a matrix object with each column as a point
# NOT RUN { A <- rbind(c(-1, 0), c(0, -1), c(1, 1)) b <- c(0, 0, 1) hit_and_run(A = A, b = b, x0 = list(c(0.1,0.1)), points = 5) # }
Run the code above in your browser using DataLab