Saturday, 31 August 2013

R: how to create a cumulative distribution function from any mixture density ?

R: how to create a cumulative distribution function from any mixture
density ?

Suppose I have the following mixture probability mass function:
pois.mix <- function(s, pi, lam) {
return
{
pi[1] * dpois(s, lambda = lam[1]) + pi[2] * dpois(s, lambda = lam[2])
}
}
How can I generate its Cumulative distribution function ?

No comments:

Post a Comment