usually u draw the bernoulli. if u get a 1 u draw from one normal. Get a 0 u take a
draw from the other. The two normals would have different parameters.
Gary
-----Original Message-----
From: Holger Lutz Kern <hlk23(a)cornell.edu>
Date: Sunday, Jul 23, 2006 8:23 pm
Subject: [gov2001-l] how to generate random deviates from a mixture of distributions?
Hi all,
does anyone know a quick (or not so quick) way to generate random deviates from a mixture
of distributions? I'd like to generate a random multivariate sample - one variable is
normally distributed and the other two Bernoulli - with a specific var-covar matrix. If
all variables were normal, I could just use mvtnorm(). But what can I do in this case? (I
thought about using Metropolis-Hastings or something like this, but maybe there is a
better way of doing this...?) Any suggestions would be very welcome.
cheers,
Holger
-- Holger Lutz Kern
Graduate Student
Department of Government
Cornell University
Institute for Quantitative Social Science
Harvard University
1737 Cambridge Street N350
Cambridge, MA 02138
www.people.cornell.edu/pages/hlk23
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l