set.seed(1)
P <- rbind(
c(0.05, 0.10, 0.25, 0.60),
c(0.40, 0.40, 0.10, 0.10),
c(0.00, 0.20, 0.80, 0.00)
)
# Stochastic draws from each row's EPD
ordPredRandom(P)
# Reproducible draws using provided uniforms
z <- c(0.2, 0.85, 1.0)
ordPredRandom(P, z = z)
Run the code above in your browser using DataLab