Date: Thu, 11 Mar 2004 06:27:53 -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: zero truncated poisson regression
Content-Type: text/plain; charset=us-ascii
Andrew,
I was mulling over my response from yesterday and realized that I
kind of got ahead of myself at one point. I indicated that
> The probability function for the zero-truncated Poisson distribution
> is
>
> p(y) = exp(-Xbeta)*(Xbeta**y)/(y!) /
> (1 - exp(-Xbeta)*(Xbeta**0)*(0!))
> = exp(-Xbeta)*(Xbeta**y)/(y!) / (1 - exp(-Xbeta))
> = -Xbeta + y*log(Xbeta) - log(y!) - log(1 - exp(-Xbeta))
This last line is incorrect, of course. I was anticipating the
log-likelihood function which the nlmixed procedure would solve.
Thus, I should have written:
p(y) = exp(-Xbeta)*(Xbeta**y)/(y!) /
(1 - exp(-Xbeta)*(Xbeta**0)*(0!))
= exp(-Xbeta)*(Xbeta**y)/(y!) / (1 - exp(-Xbeta))
and the log-likelihood function is
ll(y) = -Xbeta + y*log(Xbeta) - log(y!) - log(1 - exp(-Xbeta))
The remainder of the post should be OK.
> As you suggest, nlmixed allows one to solve the likelihood function.
>
> proc nlmixed data=mydata;
> Xbeta = beta0 + x1*beta1 + x2*beta2 + ... + x<k>*beta<k>;
> loglike = -Xbeta + y*log(Xbeta) - lgamma(y+1) -
> log(1 - exp(-Xbeta));
> model y ~ general(loglike);
> run;
Just felt that I should set the record straight.
Dale
=====
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@fhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com