# NOT RUN {
m1 <- as.Distribution(
t(apply(matrix(runif(25), 5, 5, FALSE,
list(NULL, 1:5)), 1,
function(x) x / sum(x))),
fun = "pdf"
)
m2 <- as.Distribution(
t(apply(matrix(runif(25), 5, 5, FALSE,
list(NULL, 1:5)), 1,
function(x) x / sum(x))),
fun = "pdf"
)
# uniform mixing
m3 <- mixMatrix(list(m1, m2))
# un-uniform mixing
m4 <- mixMatrix(list(m1, m2), weights = c(0.1, 0.9))
m1$cdf(3)
m2$cdf(3)
m3$cdf(3)
m4$cdf(3)
# }
Run the code above in your browser using DataLab