Date: Sat, 3 Dec 2005 18:38:10 -0800
Reply-To: Dale McLerran <stringplayer_2@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: About generalized Poisson distribution
In-Reply-To: <f00d287f0512031345t52b948bbyc82a3ae265f808cc@mail.gmail.com>
Content-Type: text/plain; charset=iso-8859-1
--- Tony Yang <tonyyangsxz@gmail.com> wrote:
> Hi, Dale;
>
> Thanks much for your code, and I am confused about the "sufficiently
> small"
> for which parameter?
Well, you know that the parameter b is between 0 and 1, and
that b does not drive the expectation. It is the parameter
a which is not bounded and which may drive the expectation.
Why do I comment about the expectation? Because for a
Poisson (or generalized Poisson), the probability of y>q
for some easily enumerated q will be essentially zero if
the expectation is small. That means that we can enumerate
the probabilities for each possible (ordered) value of the
response. If we can enumerate all of the probabilities
so that we can construct P(Y<=y) for any y<=q and P(Y<=q)=1
within some tolerance, then it is easy to construct a
discrete random variable by generating a uniform r.v.
Then, we return Y=i if
sum1(p(Y=y)) <= r.v. < sum2(p(Y=y))
where
sum1(p(Y=y)) = sum from j=0 to i (p(Y=j))
sum2(p(Y=y)) = sum from j=0 to i+1 (p(Y=j))
While we could construct our own lookup table in this manner,
the rantbl function actually makes this process easier to
implement. All that we have to do is to write the probabilities
of y=i ordered from i=1 to i=q.
> On the other hand, from the printout of proc
> freq,
> there is no observation for 0 count, which can be due to the
> parameters you
> setted or ...?
Because I forgot that the rantbl function associates the
first probability value with Y=1 rather than Y=0. Where I
had
y = rantbl(seed %do i=0 %to &q; , &&p&i %end;);
I should have written
y = rantbl(seed %do i=0 %to &q; , &&p&i %end;) - 1;
>
> Meanwhile, I want to use the acceptance-rejection method to generate
> the
> sample, I am not sure which reference distribution should I use?
> Since you
> know, for the efficiency I have to pick up one distribution which has
> similar pattern with the GP distribution? Do you have further idea?
> Thanks
> again.
Sorry, I don't have enough knowledge of acceptance-rejection
method to assist you in constructing the r.v. employing
that approach. However, what I do know of the acceptance-
rejection approach is that it is recommended when it is
difficult to construct the CDF for Y. But if there is an
easily enumerated value q such that P(Y<=q) is approximately
1, then the CDF for Y can be easily constructed employing
the approach which I outlined.
>
> Best regards,
> Tony
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com