Date: Wed, 14 Nov 2007 11:07:16 -0800
Reply-To: Robin High <robinh@UOREGON.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robin High <robinh@UOREGON.EDU>
Subject: Re: a question regarding genmod
In-Reply-To: A<546754.70408.qm@web34304.mail.mud.yahoo.com>
Content-Type: text/plain; charset="US-ASCII"
Vivian,
What you should consider is a key point about the Poisson distribution -
that is, it's a probability function based on integer counts, so the
sums of the probabilities must add to 1 for integers from 0 to infinity.
There are (at least) 3 ways to compute the Poisson probs shown below ..
2 of them fail for 'non-integer' values and of course, the cumulative
sum is greater than 1 for prb2, based on the GAMMA() function.
* poisson with mean=3;
data one;
cm_prb1=0; cm_prb2=0;
do y = 0 to 20 by .5;
prb1 = exp(-3)*(3**y)/FACT(y);
prb2 = exp(-3)*(3**y)/GAMMA(y+1);
prb3 = pdf('poisson',y,3);
cm_prb1+prb1; cm_prb2+prb2;
output;
end;
proc print;
var y prb1 cm_prb1 prb2 cm_prb2 prb3;
run;
Thus, the PDF the the POISSON is a function you can maximize for
non-integer values, though with non-integer values it doesn't retain one
of the necessary characteristics that define it to be a probability
distribution.
If you have non-integer data (and yes, I'm curious what they are) you
perhaps would do reasonably well to utilize the normal (i.e., a
continuous) approximation (or some other continuous choice with GENMOD),
depending on the actual distribution of y.
Robin High
Univ. of Oregon
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of wei
yi
Sent: Wednesday, November 14, 2007 8:29 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: a question regarding genmod
I have a question regarding running a GLM with
distribution of poisson .
proc genmod data=test;
class x1 x2;
model y=x1 x2 x3 x4 x5/link=log dist=poission;
run;
my question is whether it is OK when variable Y could
be a decimal number but not an interger if I run in
SAS.
Thanks,