[R] Mixture of Distributions

2008-02-21 Thread Evgenia
Dear R users, I would like to sample from a mixture distribution p1*f1+p2*f2+p3*f3 with f1,f2,f3 three different forms of distributions. I know that in the case of two distributions I have to sample the mixture compoment membership. How can I weight my three distributions with their respective

Re: [R] Mixture of Distributions

2008-02-21 Thread Ted Harding
On 21-Feb-08 20:58:25, Evgenia wrote: > > Dear R users, > I would like to sample from a mixture distribution > p1*f1+p2*f2+p3*f3 with f1,f2,f3 three different forms > of distributions. I know that in the case of two > distributions I have to sample the mixture compoment > membership. > > How can

Re: [R] Mixture of Distributions

2008-02-21 Thread Ted Harding
I just realised I made a bad mistaqke (see below) On 21-Feb-08 21:39:56, Ted Harding wrote: > On 21-Feb-08 20:58:25, Evgenia wrote: >> >> Dear R users, >> I would like to sample from a mixture distribution >> p1*f1+p2*f2+p3*f3 with f1,f2,f3 three different forms >> of distributions. I know that

Re: [R] Mixture of Distributions

2008-03-03 Thread David Winsemius
(Ted Harding) <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I just realised I made a bad mistaqke (see below) > > On 21-Feb-08 21:39:56, Ted Harding wrote: >> On 21-Feb-08 20:58:25, Evgenia wrote: >>> >>> Dear R users, >>> I would like to sample from a mixture distribution >>> p1*f1+p

Re: [R] Mixture of Distributions

2008-03-04 Thread David Winsemius
David Winsemius <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > #-toy code--- > rf1 <- function(n){rnorm(n,0,1)} ## normal distribution with mean=0 > rf2 <- function(n){rnorm(n,4,1)} ## normal distribution with mean=4 > rf3 <- function(n){rnorm(n,9,1)} ## normal distribution with