Date: Wed, 16 Jul 2008 10:54:28 -0500
Reply-To: Robin R High <rhigh@UNMC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robin R High <rhigh@UNMC.EDU>
Subject: Re: Simulated ZIP: SAS for Mixed Models, 2nd Ed.
In-Reply-To: <200807161341.m6GAkVrk026055@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"
Hi Kevin,
Regarding the second question, computation of lambda is the linear
predictor, x_i*B for each i, which is exponentiated to get the mean_i =
EXP(x_i*B) for each observation and since the distribution is Poisson, it
computes the variance as well. Since this is Poisson regression, the iid
assertion isn't relevant (as it is in linear regression with normally
distributed errors), since the variance is defined to change with the mean
for Poisson. Of course, there is still a possibility for overdispersion
with a ZIP model, so still need to be aware of that feature.
Robin High
UNMC
Kevin Viel <citam.sasl@GMAIL.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
07/16/2008 08:42 AM
Please respond to
Kevin Viel <citam.sasl@GMAIL.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
Simulated ZIP: SAS for Mixed Models, 2nd Ed.
I finally got my hands on a copy of the second edition, however I note the
name change. The first edition was the SAS *System* for Mixed Models.
As I am focused on zero-inflated models at the moment, I jumped staight to
page 589. The authors offer the following:
/* Littell et al. SAS for Mixed Models, Second Edition Page 589-590 */
%let pi = 0.27 ;
data zip ;
do s = 1 to 100 ;
u = rannor( 556712 ) ;
do i = 1 to 20 ;
x = int( ranuni( 0 ) * 100 ) ;
y = int( rannor( 0 ) * 100 ) ;
if ( ranuni( 0 ) < &pi ) then
do ;
count = 0 ;
lambda = . ;
end ;
else
do ;
lambda = exp( -2 + 0.01 * x + 0.01 * y + u ) ;
count = ranpoi( 0 , lambda ) ;
end ;
output ;
end ;
end ;
drop i u lambda ;
run ;
I was disappointed to see the use of a zero seed. I assert the polemic
that one should use non-zero seeds in pedagogy, so that the students
arrive
at the exact same data.
I also have a great confusion. For each i from the non-zero part, lambda
should have a different value. Does this not immediately violate the
assumptions of a regression model, namely iid?
Thanks in advance,
Kevin