By the joint density, I mean P(Y, lambda|gamma, mu), which is equal to
P(Y|lambda)P(lambda|gamma, mu) by the law of conditional probability.
P(Y|lambda) is the poisson distribution and P(lambda|gamma,mu) is the
gamma distribution. You need to write down this equation in your answer,
and in your computer program you have to evaluate this density function at
different values of Y and lambda. The goal is to obtain P(Y|gamma, mu) by
the grid method, which is equal to \int_0^{\infty} p(Y, lambda|gamma, mu)
d lambda. Compare your numerical approximation with the true marginal
density which appears on page 53 of the lecture notes.
Kosuke
---------- Forwarded message ----------
Date: Wed, 26 Feb 2003 11:07:12 -0500 (EST)
To: Kosuke Imai <kimai(a)fas.harvard.edu>
Subject: Re: [gov2001-l] Problem 4
when you say joint density, do you mean we pick a lamda from the gamma
function and then pick y from the poisson with that lamda. that gives us
one column in the matrix. is this right?
On Wed, 26 Feb 2003, Kosuke Imai wrote:
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