First, simulate a uniform r.v on [0,1] and then cast it to binary label
according to your underlying mixing probability;
Second, simulate a Gaussian r.v. in above selected component.
Of course, you can vecterize the two steps to simply your code.
X
Peng Jiang 写道:
Hi,
Is there any package
Hi, Peng,
I had a piece of SAS code for 2-class gaussian mixture from my blog.
You might convert it to R code.
2-Class Gaussian Mixture Model in SAS
data d1;
do i = 1 to 100;
x = ranuni(1);
e = rannor(1);
y = 5 * x + e;
output;
end;
run;
data d2;
do i = 1 to 100;
x = ran
Take a look at mixtools.
Tatiana
On Jun 22, 2008, at 9:23 PM, Peng Jiang wrote:
Hi,
Is there any package that I can use to simulate the Gaussian
Mixture Model , which is a mixture modeling method that is widely
used in statistical learning theory.
I know there is a mclust, however, I
Hi,
Is there any package that I can use to simulate the Gaussian
Mixture Model , which is a mixture modeling method that is widely used
in statistical learning theory.
I know there is a mclust, however, I think it is a little bit
different from my problem.
Thanks very much..
regards.
4 matches
Mail list logo