I think that the confusion is this: If lambda is distributed
according to the gamma (continuous) distribution, how can we
"construct a matrix"? Do you really want us to construct an
actual matrix (in R), for which (I think) we would need to
evaluate the poisson distribution at specific values of lambda,
or do you just want us to do it theoretically and integrate to
get the marginal density over some range of y?
Am I still lost?
Thanks, Olivia.
----- Original Message -----
From: "Kosuke Imai" <kimai(a)fas.harvard.edu>
To: <gov2001-l(a)fas.harvard.edu>
Sent: Wednesday, February 26, 2003 9:57 AM
Subject: [gov2001-l] Problem 4
A number of people have asked questions about problem
4 last
night. Here
is a basic idea. You want to evaluate the
"joint" density with
different
values of y and lambda where y is poisson and lambda
is gamma.
This is the
joint density function, so you are not drawing random
variables from any
distribution. you are simply evaluating the height of
the
density. To do
this, you need to create a matrix where its row and
column
represents y
and labmda, respectively. Then, to integrate out
lambda, you
want to sum
over the column. After normalizing it, this gives you
the
marginal
density of negative binomial.
Kosuke
_______________________________________________
gov2001-l mailing list
gov2001-l(a)fas.harvard.edu
http://www.fas.harvard.edu/mailman/listinfo/gov2001-l