R/mixture.R
cdf.mixture.Rd
Returns a function that evaluates the mixture CDF at given points. The mixture CDF is \(F(x) = \sum_k w_k F_k(x)\).
# S3 method for class 'mixture' cdf(x, ...)
A mixture object.
mixture
Additional arguments (not used).
A function function(q, ...) returning the CDF at q.
function(q, ...)
q
m <- mixture(list(normal(0, 1), normal(5, 1)), c(0.5, 0.5)) F <- cdf(m) F(0) #> [1] 0.2500001 F(5) #> [1] 0.7499999